質問編集履歴
2
エラー文をできる限る記載しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,9 +9,10 @@
|
|
9
9
|
|
10
10
|
```
|
11
11
|
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
|
12
|
-
2021-09-
|
12
|
+
2021-09-13 17:23:26.318 ERROR 932 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
|
13
13
|
|
14
|
-
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'signupController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'mapper'; nested exception is org.
|
14
|
+
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'signupController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'mapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [/Applications/Eclipse_2019-12.app/Contents/workspace/SpringBootSample/target/classes/com/example/demo/repository/UserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [/Applications/Eclipse_2019-12.app/Contents/workspace/SpringBootSample/target/classes/mapper/h2/UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 21; 疑似属性名が必要です。
|
15
|
+
|
15
16
|
```
|
16
17
|
|
17
18
|
### 該当のソースコード
|
1
signupControllerとそれを使うクラスのソースコード画像を追加添付しました。クラスの冒頭を小文字にしても解決しませんでした。springのバージョンは2.5.4でした。
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
|
3
|
-
現在、「spring解体新書(第2版)」を参考に
|
3
|
+
現在、「spring解体新書(第2版)」を参考にspringBoot2.5.4を使用してwebアプリ開発を行なっています。
|
4
4
|
手順通りに行なっていたのですがorg.springframework.beans.factory.UnsatisfiedDependencyExceptionというエラーが発生し、先に進めなくなってしまいました。いろいろ調べてみましたが解決方法がわかりません。
|
5
5
|
解決方法をご存知の方いましたら教えていただけると助かります。
|
6
6
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
|
12
12
|
2021-09-11 13:20:44.727 ERROR 1281 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
|
13
13
|
|
14
|
-
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'signupController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'mapper'; nested exception is org.
|
14
|
+
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'signupController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'mapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
|
15
15
|
```
|
16
16
|
|
17
17
|
### 該当のソースコード
|
@@ -192,4 +192,7 @@
|
|
192
192
|
)
|
193
193
|
</insert>
|
194
194
|
</mapper>
|
195
|
-
```
|
195
|
+
```
|
196
|
+

|
197
|
+

|
198
|
+

|