Skip to content

Instantly share code, notes, and snippets.

@namutaka
Created March 25, 2016 14:43
Show Gist options
  • Save namutaka/5e95fc6b6e8dcd307b39 to your computer and use it in GitHub Desktop.
Save namutaka/5e95fc6b6e8dcd307b39 to your computer and use it in GitHub Desktop.
use system properties in spring
<beans>
<context:property-placeholder
location="classpath*:config-${my.env}.properties"
order="1"
ignore-unresolvable="true"
/>
</beans>
5.10. プロパティ管理 — TERASOLUNA Global Framework Development Guideline 1.0.0.publicreview documentation
https://terasolunaorg.github.io/guideline/public_review/ArchitectureInDetail/PropertyManagement.html
6 Tips for Managing Property Files with Spring
http://www.summa.com/blog/2009/04/20/6-tips-for-managing-property-files-with-spring
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/app</path>
<systemProperties>
<my.env>dev</my.env>
</systemProperties>
</configuration>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment