티스토리 뷰

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
use maven properties in web.xml  (0) 2015.05.24
spring util:properties 사용  (0) 2015.05.08
[HTTP] head 메소드 에러  (0) 2015.04.15
base spring4 servletContext  (0) 2015.04.08
댓글
댓글쓰기 폼