Using Maven settings.xml properties inside Spring context

前端 未结 3 1791
隐瞒了意图╮
隐瞒了意图╮ 2020-12-20 18:17

I\'ve got a Maven settings.xml file in my ~/.m2 directory; it looks like this:


    
        

        
3条回答
  •  轮回少年
    2020-12-20 19:03

    There is a way of filtering web resources by configuration of Maven War Plugin. Look at this for a snippet from official plugin's docs.

    And by the way, I strongly recommend reconsidering this filtering-based way for providing de facto run-time configuration at build-time. Just notice that you have to rebuild the same code to just prepare package for another environment (or alternatively edit package contents). You can use application server's specific stuff for this (at least JBoss has one) or use Spring that AFAIR also can be configured like this.

提交回复
热议问题