亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

一直報錯說 找不到bean

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'myBatisCRUDController': Unsatisfied dependency expressed through field 'clothService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'clothServiceImpl': Unsatisfied dependency expressed through field 'clothMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'clothMapper' defined in file [F:\Project\target\classes\com\abc\mapper\ClothMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [tk/mybatis/mapper/autoconfigure/MapperAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/boot/bind/RelaxedDataBinder

正在回答

5 回答

解決了嗎?


0 回復 有任何疑惑可以回復我~

我也是這個錯

0 回復 有任何疑惑可以回復我~

NoClassDefFoundError: org/springframework/boot/bind/RelaxedDataBinder

boot里面找不到包,org.springframework.boot.bind 包已經刪掉了,導致RelaxedPropertyResolver這個方法已經不可用了.

<dependency>
??? <groupId>com.alibaba</groupId>
?? <artifactId>druid-spring-boot-starter</artifactId>
?? <version>1.1.0</version>
</dependency>

這個依賴刪掉即可~~

1 回復 有任何疑惑可以回復我~
#1

yindz

刪掉都不行
2019-05-27 回復 有任何疑惑可以回復我~

我也啟動報錯,找不到這個注入的service的Bean,注解都沒少,對著老師的代碼寫的,到底在哪配置的bean???

0 回復 有任何疑惑可以回復我~

看看少不少注解 @RestController 以及?'myBatisCRUDController'里面的接口上面有沒有@Autowried ?

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

一直報錯說 找不到bean

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號