spring-boot-configuration-processor的作用

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>
文章来自:https://www.cnblogs.com/xsjzhao/p/10901579.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3