Springboot .properties或.yml配置文件读取pom.xml文件值

时间:2019-06-26 19:39:19   收藏:0   阅读:1145

有时候配置文件需要读取pom文件配置<properties></properties>中间自定义属性值的时候可以用@@获取

例:@package.parameter@

然后还需要在pom.xml中打开过滤才可以

  <build>
        <resources>
            <resource>
          <!--指定resources插件处理哪个目录下的资源文件--> <directory>src/main/resources</directory>
          <!--打开资源过滤功能--> <filtering>true</filtering> </resource> </resources> </build>

原文:https://www.cnblogs.com/boris-et/p/11093016.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!