Last active
December 23, 2019 16:27
-
-
Save gotnix/a52b67001ee4e241932e to your computer and use it in GitHub Desktop.
通过 JVM 系统属性使 Tomcat .war 包读取外部目录的配置。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 通过 JVM 系统属性使 Tomcat .war 包读取外部目录的配置,方便线上部署。演示命令: | |
| java -Dapp_name.conf.dir=/var/www/config/app_name/ \ | |
| -Dapp_name.log.dir=/var/log/app_name/ \ | |
| Property | |
| */ | |
| // Property.java | |
| import java.util.Properties; | |
| public class Property { | |
| public static void main(String[] args) { | |
| System.getProperties().list(System.out); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment