teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

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

2021/09/13 08:30

投稿

sakapooon
sakapooon

スコア0

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-11 13:20:44.727 ERROR 1281 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
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.springfr![イメージ説明](7fa79ca634ca9a41d395d35a91ee65e5.png)amework.beans.factory.UnsatisfiedDependencyException:
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でした。

2021/09/13 08:30

投稿

sakapooon
sakapooon

スコア0

title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,6 @@
1
1
  ### 前提・実現したいこと
2
2
 
3
- 現在、「spring解体新書(第2版)」を参考にspringBoot3を使用してwebアプリ開発を行なっています。
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.springframework.beans.factory.UnsatisfiedDependencyException:
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.springfr![イメージ説明](7fa79ca634ca9a41d395d35a91ee65e5.png)amework.beans.factory.UnsatisfiedDependencyException:
15
15
  ```
16
16
 
17
17
  ### 該当のソースコード
@@ -192,4 +192,7 @@
192
192
  )
193
193
  </insert>
194
194
  </mapper>
195
- ```
195
+ ```
196
+ ![イメージ説明](54b00a2c9bc3c4505da52d7a820de173.png)
197
+ ![イメージ説明](3aaeea0d5852e7d3bc6c3412237d2937.png)
198
+ ![イメージ説明](ceb1dda37e9993ab316f9a0fcb03b464.png)