質問編集履歴
3
エラー内容の変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Spring Boot入門という参考書を勉強しているのですが、参考書のとおりにコードを書いて実行するとエラーが出ます。
|
2
|
-
|
2
|
+
先週から解決策を調べているのですが、まだわかりません。
|
3
3
|
ご教授お願いいたします。
|
4
4
|
|
5
5
|
```java
|
@@ -189,11 +189,8 @@
|
|
189
189
|
</plugin>
|
190
190
|
</plugins>
|
191
191
|
</build>
|
192
|
-
|
193
|
-
|
194
192
|
</project>
|
195
193
|
|
196
194
|
```
|
197
195
|
エラー内容
|
198
|
-
org.springframework.beans.factory.BeanCreationException:
|
199
|
-
at com.yamada.springboot.MyBootAppApplication.main(MyBootAppApplication.java:10) [classes/:na]
|
196
|
+
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'heloController':Error creating bean with name 'myDataRepository':No bean named 'entityManagerFactory' is defined
|
2
エラー内容の変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -114,6 +114,21 @@
|
|
114
114
|
|
115
115
|
}
|
116
116
|
```
|
117
|
+
```java
|
118
|
+
package com.yamada.springboot;
|
119
|
+
|
120
|
+
import org.springframework.boot.SpringApplication;
|
121
|
+
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
122
|
+
|
123
|
+
@SpringBootApplication
|
124
|
+
public class MyBootAppApplication {
|
125
|
+
|
126
|
+
public static void main(String[] args) {
|
127
|
+
SpringApplication.run(MyBootAppApplication.class, args);
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
```
|
117
132
|
```xml
|
118
133
|
<?xml version="1.0" encoding="UTF-8"?>
|
119
134
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
@@ -180,4 +195,5 @@
|
|
180
195
|
|
181
196
|
```
|
182
197
|
エラー内容
|
183
|
-
|
198
|
+
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext':At least one JPA metamodel must be present!
|
199
|
+
at com.yamada.springboot.MyBootAppApplication.main(MyBootAppApplication.java:10) [classes/:na]
|
1
エラー内容を追記しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -178,4 +178,6 @@
|
|
178
178
|
|
179
179
|
</project>
|
180
180
|
|
181
|
-
```
|
181
|
+
```
|
182
|
+
エラー内容
|
183
|
+
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' is defined
|