在使用configurationProperties注解时需要引入的依赖
ConfigurationProperties 是Spring boot中的类,单独添加Spring boot Maven依赖即可.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>1.5.16.RELEASE</version>
</dependency>
网上说的 添加以下依赖,试了,不管用.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>