質問編集履歴
4
修正いたしました
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,67 +14,49 @@
|
|
14
14
|
|
15
15
|
ご回答のほど宜しくお願い致します
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
2016-08-21 1
|
26
|
-
|
27
|
-
2016-08-21 1
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
2016-08-21 1
|
34
|
-
|
35
|
-
2016-08-21 1
|
36
|
-
|
37
|
-
2016-08-21 1
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
2016-08-21 10:47:02.312 INFO 636 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
|
56
|
-
|
57
|
-
2016-08-21 10:47:02.312 INFO 636 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
|
58
|
-
|
59
|
-
2016-08-21 10:47:02.360 INFO 636 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
60
|
-
|
61
|
-
2016-08-21 10:47:02.361 INFO 636 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
62
|
-
|
63
|
-
2016-08-21 10:47:02.436 INFO 636 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
64
|
-
|
65
|
-
2016-08-21 10:47:03.208 INFO 636 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
|
66
|
-
|
67
|
-
2016-08-21 10:47:03.320 INFO 636 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
|
68
|
-
|
69
|
-
2016-08-21 10:47:03.329 INFO 636 --- [ main] c.t.springboot.SokutakuhaiApplication : Started SokutakuhaiApplication in 8.455 seconds (JVM running for 9.286)
|
70
|
-
|
71
|
-
|
17
|
+
```
|
18
|
+
|
19
|
+
エラーメッセージ(修正後)
|
20
|
+
|
21
|
+
2016-08-21 21:29:22.614 INFO 1279 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
|
22
|
+
|
23
|
+
2016-08-21 21:29:23.410 INFO 1279 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
|
24
|
+
|
25
|
+
2016-08-21 21:29:23.507 INFO 1279 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
|
26
|
+
|
27
|
+
2016-08-21 21:29:23.515 INFO 1279 --- [ main] c.t.springboot.SokutakuhaiApplication : Started SokutakuhaiApplication in 8.004 seconds (JVM running for 8.653)
|
28
|
+
|
29
|
+
2016-08-21 21:29:31.213 INFO 1279 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring FrameworkServlet 'dispatcherServlet'
|
30
|
+
|
31
|
+
2016-08-21 21:29:31.213 INFO 1279 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started
|
32
|
+
|
33
|
+
2016-08-21 21:29:31.238 INFO 1279 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 25 ms
|
34
|
+
|
35
|
+
2016-08-21 21:29:31.335 INFO 1279 --- [nio-8080-exec-1] o.h.h.i.QueryTranslatorFactoryInitiator : HHH000397: Using ASTQueryTranslatorFactory
|
36
|
+
|
37
|
+
2016-08-21 21:29:31.580 ERROR 1279 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: No default constructor for entity: : com.tuyano.springboot.MyDataMongo; nested exception is org.hibernate.InstantiationException: No default constructor for entity: : com.tuyano.springboot.MyDataMongo] with root cause
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
org.hibernate.InstantiationException: No default constructor for entity: : com.tuyano.springboot.MyDataMongo
|
42
|
+
|
43
|
+
at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:84) ~[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
|
44
|
+
|
45
|
+
at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:100) ~[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
|
46
|
+
|
47
|
+
at org.hibernate.tuple.entity.AbstractEntityTuplizer.instantiate(AbstractEntityTuplizer.java:631) ~[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
|
48
|
+
|
49
|
+
at org.hibernate.persister.entity.AbstractEntityPersister.instantiate(AbstractEntityPersister.java:4616) ~[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
|
50
|
+
|
51
|
+
at org.hibernate.internal.SessionImpl.instantiate(SessionImpl.java:1470) ~[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
|
52
|
+
|
53
|
+
at org.hibernate.internal.SessionImpl.instantiate(SessionImpl.java:1454) ~[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
|
72
54
|
|
73
55
|
```
|
74
56
|
|
75
57
|
```java
|
76
58
|
|
77
|
-
・HeloController
|
59
|
+
・HeloController(修正後)
|
78
60
|
|
79
61
|
package com.tuyano.springboot;
|
80
62
|
|
@@ -148,7 +130,7 @@
|
|
148
130
|
|
149
131
|
ModelAndView mov){
|
150
132
|
|
151
|
-
MyDataMongo mydata =new MyDataMongo();
|
133
|
+
MyDataMongo mydata =new MyDataMongo(name,memo);
|
152
134
|
|
153
135
|
System.out.println("mydataは"+mydata);
|
154
136
|
|
@@ -212,11 +194,7 @@
|
|
212
194
|
|
213
195
|
mav.addObject("dataList",list);
|
214
196
|
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
197
|
+
}
|
220
198
|
|
221
199
|
return mav;
|
222
200
|
|
@@ -228,7 +206,7 @@
|
|
228
206
|
|
229
207
|
```java
|
230
208
|
|
231
|
-
・MyDataMongo.java
|
209
|
+
・MyDataMongo.java(修正後)
|
232
210
|
|
233
211
|
package com.tuyano.springboot;
|
234
212
|
|
@@ -250,8 +228,6 @@
|
|
250
228
|
|
251
229
|
import javax.persistence.Table;
|
252
230
|
|
253
|
-
|
254
|
-
|
255
231
|
@Entity
|
256
232
|
|
257
233
|
@Table(name="Linefriend")
|
@@ -278,19 +254,27 @@
|
|
278
254
|
|
279
255
|
//private Date date;
|
280
256
|
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
public
|
257
|
+
public MyDataMongo(String name, String memo) {
|
258
|
+
|
286
|
-
|
259
|
+
super();
|
287
|
-
|
288
|
-
|
260
|
+
|
289
|
-
this.
|
261
|
+
this.name=name;
|
262
|
+
|
290
|
-
|
263
|
+
this.memo=memo;
|
291
|
-
|
292
|
-
|
264
|
+
|
293
|
-
}
|
265
|
+
}
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
//public void setId(Long id){
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
// this.id=id;
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
//}
|
294
278
|
|
295
279
|
|
296
280
|
|
@@ -320,15 +304,7 @@
|
|
320
304
|
|
321
305
|
|
322
306
|
|
323
|
-
|
307
|
+
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
this.name=name;
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
}
|
332
308
|
|
333
309
|
|
334
310
|
|
@@ -348,33 +324,23 @@
|
|
348
324
|
|
349
325
|
|
350
326
|
|
351
|
-
|
327
|
+
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
328
|
+
|
356
|
-
|
357
|
-
|
358
|
-
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
359
|
-
}
|
337
|
+
}
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
338
|
+
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
339
|
+
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
340
|
+
|
372
|
-
|
373
|
-
|
341
|
+
|
374
|
-
|
342
|
+
|
375
|
-
```
|
343
|
+
```
|
376
|
-
|
377
|
-
|
378
344
|
|
379
345
|
```HTML
|
380
346
|
|
3
コードの箇所を``` ```で囲むように再度修正いたしましたので宜しくお願い致します
test
CHANGED
File without changes
|
test
CHANGED
@@ -70,11 +70,7 @@
|
|
70
70
|
|
71
71
|
|
72
72
|
|
73
|
-
|
73
|
+
```
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
74
|
|
79
75
|
```java
|
80
76
|
|
@@ -230,7 +226,7 @@
|
|
230
226
|
|
231
227
|
```
|
232
228
|
|
233
|
-
|
229
|
+
```java
|
234
230
|
|
235
231
|
・MyDataMongo.java
|
236
232
|
|
@@ -256,12 +252,6 @@
|
|
256
252
|
|
257
253
|
|
258
254
|
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
255
|
@Entity
|
266
256
|
|
267
257
|
@Table(name="Linefriend")
|
@@ -382,7 +372,11 @@
|
|
382
372
|
|
383
373
|
}
|
384
374
|
|
385
|
-
|
375
|
+
```
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
```HTML
|
386
380
|
|
387
381
|
・index.html
|
388
382
|
|
@@ -450,7 +444,11 @@
|
|
450
444
|
|
451
445
|
</html>
|
452
446
|
|
453
|
-
|
447
|
+
```
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
```java
|
454
452
|
|
455
453
|
・MyDataMongoRepository.java
|
456
454
|
|
@@ -478,4 +476,6 @@
|
|
478
476
|
|
479
477
|
}
|
480
478
|
|
479
|
+
|
480
|
+
|
481
|
-
```
|
481
|
+
```
|
2
コードの箇所を``` ```で囲むように修正いたしましたので宜しくお願い致します
test
CHANGED
File without changes
|
test
CHANGED
@@ -74,7 +74,9 @@
|
|
74
74
|
|
75
75
|
|
76
76
|
|
77
|
+
|
78
|
+
|
77
|
-
```
|
79
|
+
```java
|
78
80
|
|
79
81
|
・HeloController
|
80
82
|
|
@@ -226,6 +228,8 @@
|
|
226
228
|
|
227
229
|
}
|
228
230
|
|
231
|
+
```
|
232
|
+
|
229
233
|
|
230
234
|
|
231
235
|
・MyDataMongo.java
|
1
コードの箇所を``` ```で囲むように修正いたしましたので宜しくお願い致します
test
CHANGED
File without changes
|
test
CHANGED
@@ -72,12 +72,10 @@
|
|
72
72
|
|
73
73
|
|
74
74
|
|
75
|
-
|
75
|
+
|
76
76
|
|
77
77
|
```ここに言語を入力
|
78
78
|
|
79
|
-
ここにご自身が実行したソースコードを書いてください
|
80
|
-
|
81
79
|
・HeloController
|
82
80
|
|
83
81
|
package com.tuyano.springboot;
|
@@ -475,3 +473,5 @@
|
|
475
473
|
List<MyDataMongo>findByName(String s);
|
476
474
|
|
477
475
|
}
|
476
|
+
|
477
|
+
```
|