java两个模块之间调用service注入问题
遇到上述问题需要加入以下语句
@SpringBootApplication(scanBasePackages = {“com.heisenberg.weather.pro”,“com.heisenberg.authmgr”})
@MapperScan(basePackages = {“com.heisenberg.weather_pro.mapper”,“com.heisenberg.authmgr.dao”})
需要在调用别的模块的主程序上加入scanBasePackages 范围,要不然程序不知道你引用的是谁,并且要扫描创建的实体类的位置basePackages ,否则出现以下情况No qualifying bean of type ‘com.zxq.api.dao.UserDao’ available: expected at least …