質問編集履歴

2

エラー文をできる限る記載しました

2021/09/13 08:30

投稿

sakapooon
sakapooon

スコア0

test CHANGED
File without changes
test CHANGED
@@ -20,11 +20,13 @@
20
20
 
21
21
  Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
22
22
 
23
- 2021-09-11 13:20:44.727 ERROR 1281 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
24
-
25
-
26
-
27
- 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.springfr![イメージ説明](7fa79ca634ca9a41d395d35a91ee65e5.png)amework.beans.factory.UnsatisfiedDependencyException:
23
+ 2021-09-13 17:23:26.318 ERROR 932 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
24
+
25
+
26
+
27
+ 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; 疑似属性名が必要です。
28
+
29
+
28
30
 
29
31
  ```
30
32
 

1

signupControllerとそれを使うクラスのソースコード画像を追加添付しました。クラスの冒頭を小文字にしても解決しませんでした。springのバージョンは2.5.4でした。

2021/09/13 08:30

投稿

sakapooon
sakapooon

スコア0

test CHANGED
File without changes
test CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- 現在、「spring解体新書(第2版)」を参考にspringBoot3を使用してwebアプリ開発を行なっています。
5
+ 現在、「spring解体新書(第2版)」を参考にspringBoot2.5.4を使用してwebアプリ開発を行なっています。
6
6
 
7
7
  手順通りに行なっていたのですがorg.springframework.beans.factory.UnsatisfiedDependencyExceptionというエラーが発生し、先に進めなくなってしまいました。いろいろ調べてみましたが解決方法がわかりません。
8
8
 
@@ -24,7 +24,7 @@
24
24
 
25
25
 
26
26
 
27
- 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:
27
+ 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.springfr![イメージ説明](7fa79ca634ca9a41d395d35a91ee65e5.png)amework.beans.factory.UnsatisfiedDependencyException:
28
28
 
29
29
  ```
30
30
 
@@ -387,3 +387,9 @@
387
387
  </mapper>
388
388
 
389
389
  ```
390
+
391
+ ![イメージ説明](54b00a2c9bc3c4505da52d7a820de173.png)
392
+
393
+ ![イメージ説明](3aaeea0d5852e7d3bc6c3412237d2937.png)
394
+
395
+ ![イメージ説明](ceb1dda37e9993ab316f9a0fcb03b464.png)