注入@ConfigurationProperties(prefix = "limit")报错
来源:4-1 项目属性配置知多少

None_null
2019-09-04
添加过:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
没用.
spring boot的版本也对:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
也重启过idea,但是就是不行
写回答
2回答
-
None_null
提问者
2019-09-04
已解决,添加注解:@Component
10 -
Bug总是难免的
2019-11-22
@Configuration注解代表配置比较好,虽然component也能达到同样的效果
00
相似问题