首页 新闻 赞助 找找看

Spring Boot 一个DAO报错了

0
悬赏园豆:10 [待解决问题]

下面是报错信息

Description:

Field classHourRecordDAO in com.temp.service.export.impl.DataReportServiceImpl required a bean of type 'com.temp.dao.finance.ClassHourRecordDAO' that could not be found.

The injection point has the following annotations:
    - @org.springframework.beans.factory.annotation.Autowired(required=true)

启动项如下

@SpringBootApplication
@EnableTransactionManagement

//



public class Application {

    public static void main(String[] args) {
        //star
        SpringApplication.run(Application.class,args);
    }
}
  • 我其他的DAO都没有报错呀!!!
阳虎为患的主页 阳虎为患 | 初学一级 | 园豆:151
提问于:2019-08-05 19:53
< >
分享
所有回答(5)
0

com.temp.dao.finance.ClassHourRecordDAO这个的依赖之类的不对,可以先屏蔽下这个,然后根据异常栈信息定位下错误

2012 | 园豆:21228 (高人七级) | 2019-08-06 07:58
0

com.temp.service.export.impl.DataReportServiceImpl 下 com.temp.dao.finance.ClassHourRecordDAO 没找到,看看你的注解

阿克西斯教成员污米饭 | 园豆:129 (初学一级) | 2019-08-06 14:00
0

启动类上加入:@MapperScan(basePackages = { "com.temp.dao.finance" })

日落西风又在吹 | 园豆:212 (菜鸟二级) | 2019-08-15 18:43
0

ClassHourRecordDAO加注解了吗?

无恨之都 | 园豆:287 (菜鸟二级) | 2019-08-30 09:56
0

会不会是这个dao没注册到Spring容器中

seeder | 园豆:202 (菜鸟二级) | 2019-11-20 10:35
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册