spring-boot-configuration-processor的作用

时间:2019-05-21 19:25:05   收藏:0   阅读:2507
When using @ConfigurationProperties it is recommended to add 'spring-boot-configuration-processor' to your classpath to generate configuration metadata

SpringBoot默认使用yml配置文件,使用xmlproperties作为配置文件时SpriingBooot建议将spring-boot-configuration-processor添加到类路径生成配置元数据,其余用法和yml一致。
消除警告,只需要将spring-boot-configuration-processor依赖添加到pom.xml
在denpendencies节点下添加:

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!