springboot整合druid,项目中有接口后druid配置为空启动报错问题



项目没有创建interface文件的时候启动是正常的,项目中如果新建一个接口文件如图中的IUserService,启动项目报错:
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'IUserService' defined in file [E:fqtx-springbootfqtxtargetclassesnetweblooserviceIUserService.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 [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'druidDataSource' defined in class path resource [net/webloo/utils/config/DruidAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'druidDataSource' threw exception; nested exception is java.lang.IllegalArgumentException: maxActive can't not set zero
也就是说只有项目里存在一个自定义接口文件,获取配置文件就获取不到,这是啥原因
解决方案:
删除 pom.xml里面加的 spring-boot-devtools 这个热部署依赖
