01-02 17:14:03.821 [main] INFO org.apache.catalina.core.StandardService - Stopping service [Tomcat]
01-02 17:14:03.916 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter -
***************************
APPLICATION FAILED TO START
***************************
Description:
Field KkCodeService in com.sunshine.monitor.controller.KkCode required a bean of type 'com.sunshine.monitor.service.KkCodeService' that could not be found.
Action:
Consider defining a bean of type 'com.sunshine.monitor.service.KkCodeService' in your configuration.
断开与目标 VM 的连接,地址:'127.0.0.1:64963', transport: 'socket'
进程已结束,退出代码 1
背景:在现有项目中开发新功能,新建mvc controller-service-dao
错误原因:
Field KkCodeService in com.sunshine.monitor.controller.KkCode required a bean of type 'com.sunshine.monitor.service.KkCodeService' that could not be found.
Action:
Consider defining a bean of type 'com.sunshine.monitor.service.KkCodeService' in your configuration.
@Qualifier中的name对应的类找不到、@Autowired
处理方法,去掉Qualifier 采用spring自带的注入方式,