您的位置: 首页 > 文章 > 错误:Consider defining a bean of type '*.UserService' in your configuration 错误:Consider defining a bean of type '*.UserService' in your configuration 分类: 文章 • 2024-05-06 16:50:22 启动springboot项目遇到一个问题:Consider defining a bean of type 原因描述: 项目已被分解为不同的模块,需要指定独立模块要扫描的类或包 解决方案: 在对应的类标签上加上 @SpringBootApplication @ComponentScan("com.citic.core")