티스토리 뷰

http://stackoverflow.com/questions/27566267/maven-how-to-fill-a-variable-in-web-xml-file




I want it

<init-param>
<param-name>url</param-name>
<param-value>${targetUrl}</param-value>
</init-param>

<profiles>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<env>local</env>
<targetUrl>http://local.target.url</targetUrl>
</properties>
</profile>


solution (in pom.xml)

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
</configuration>
</plugin>





'공부 > Spring :: Web Framework' 카테고리의 다른 글

js study 2  (0) 2015.06.17
Thymeleaf :: Spring beans  (0) 2015.05.31
spring util:properties 사용  (0) 2015.05.08
[HTTP] head 메소드 에러  (0) 2015.04.15
base spring4 servletContext  (0) 2015.04.08
댓글
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함