Spingboot项目启动时报一下错误,错误如下:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-08-27 18:18:13.481 ERROR 4816 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Field zgrtZdxmDao in com.cetc15.zdxm.service.impl.ZdxmDtXgpjServiceImpl required a bean of type 'com.cetc15.zdxm.dao.ZgrtZdxmDao' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'com.cetc15.zdxm.dao.ZgrtZdxmDao' in your configuration.
报错大概意思就是,无法找到对应的dao接口,经过分析发现,未设置保扫描文章来源:https://www.toymoban.com/news/detail-768384.html
解决方案如下:在启动类上加入以下代码即可文章来源地址https://www.toymoban.com/news/detail-768384.html
@SpringBootApplication
@MapperScan(basePackages = "com.cetc15.zdxm.dao")//指定包扫描
public class DemoApplication {
到了这里,关于The injection point has the following annotations: - @org.springframework.beans.factory.annotation.的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!