jar 包啓動時指定配置文件 application.ymljava
nohup java -jar -Dserver.port=8080 wx-member-card-0.0.1-SNAPSHOT.war --spring.config.location=file:./application-prod.yml &spring
nohup java -jar vTest.jar --spring.config.location=/opt/vTest-conf/application.yml > /opt/vTest-conf/nohup.out 2>&1 &app
若是不喜歡將 application.properties 做爲配置文件名,你也能夠經過指定 spring.config.name 環境屬性來切換其餘的名稱,調試
也可使用 spring.config.location 環境屬性引用一個明確的路徑(目錄位置或文件路徑)server
指定配置文件:--spring.config.location=/opt/vpaas-conf/application.ymlio
將全部的調試信息輸入到:/opt/vpaas-conf/nohup.out配置