The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
问题描述
当导入其他包而且需要Spring自动装配报错
原因分析:
当导入其他包的时候,使用@Autowired 注解时,Spring无法完成自动装配
解决方案:
在被导入包的resources文件夹里创建 META-INF 文件夹 然后创建 spring.factories 文件
文件结构示例:
org.springframework.boot.autoconfigure.EnableAutoConfiguration= com.ruoyi.system.api.factory.RemoteUserFallbackFactory, com.ruoyi.system.api.factory.RemoteLogFallbackFactory, com.ruoyi.system.api.factory.RemoteFileFallbackFactory



