环境: Spring Cloud:Finchley.M8 Spring Boot:2.0.0.RELEASE 目录结构: 可以看到代码第13行的注释,我已经在@ComponentScan注解中添加了Exclude配置项,但是启动服务的时候还是报如下的错误: 2018-04-12 15:59:37.815 WARN 17828 --- [ main] o.s.b.f.support.DisposableBeanAdapter : Invocation of destroy method 'clos…
Field userService in com.wuji.controller.UserController required a bean of type 'com.wuji.service.UserService' that could not be found. 原因:说明IOC里没有创建Bean,在启动文件上手动添加:@ComponentScan(basePackages = {"com.wuji"})注解开启Spring组件扫描…
转自:https://blog.csdn.net/awmw74520/article/details/82687288 APPLICATION FAILED TO START Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.2018-09-01 19:16:54,375 [main] [org.sprin…
SpringCloud报错: "Field discoveryClient in com.controller.DcController required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found." 解决方案: Discovery的包有两个,导入 org.springframework.cloud.client.discovery.DiscoveryClient才是正确…
spring中一个符号的错误居然让我浪费了四五个小时才找出来,不得不给自己了两个耳光.. 由于新建项目与原来项目的目录结构有所不同,copy过来的配置文件,有些地方修改的不彻底,导致spring扫描注解的时候,扫描不到,不能注入bean,导致运行出错.一个马虎浪费了这么多时间,符号这种问题也往往最容易忽视的.<context:component-scan base-package="com.oskyhang.*.service"/> <context:componen…
报错信息: 2018-06-25 14:26:17.103  WARN 49752 --- [  restartedMain] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyExcept…
1.完整报错 *************************** APPLICATION FAILED TO START *************************** Description: Field relTelBillRecordRepository in com.xx.service.TelParseService required a bean of type 'com.xx.repository.IRelTelBillRecordRepository' that co…
运行springboot项目报错: *************************** APPLICATION FAILED TO START *************************** Description: Field userMapper in com.whohim.springboot.service.impl.UserServiceImpl required a bean of type 'com.whohim.springboot.dao.UserMapper' t…
*************************** APPLICATION FAILED TO START *************************** Description: Field redisTemplate in com.demo.service.UserServiceImpl required a bean of type 'org.springframework.data.redis.core.RedisTemplate' that could not be fou…
When runung a SpringBoot demo, I  got a error as following: *************************** APPLICATION FAILED TO START *************************** Description: Field service in com.hy.empcloud.EmpControl required a bean of type 'com.hy.empcloud.EmpServi…