Springboot读取外部配置文件,项目部署时配置读取不到问题及解决

  /usr/local/java/jdk1.8.0_131/bin/java -jar -server -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/spb_zcmweb/8103/dump/heap/

  -Djava.io.tmpdir=/data/liuch/tmp/

  -Dserver.port=8103

  -Dcom.sun.management.jmxremote

  -Dcom.sun.management.jmxremote.port=5103

  -Dcom.sun.management.jmxremote.rmi.port=6103

  -Dcom.sun.management.jmxremote.authenticate=false

  -Dcom.sun.management.jmxremote.ssl=false

  -Dcom.sun.management.jmxremote.access.file=/usr/local/java/jdk1.8.0_131/jre/lib/management/jmxremote.access

  -Xmx2G -Xms2G -XX:+DisableExplicitGC -verbose:gc -Xloggc:/data/liuch/log/gc.%t.log -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCTaskTimeStamps -XX:+PrintGCDetails -XX:+PrintGCDateStamps

  -Dserver.connection-timeout=60000

  -Dserver.tomcat.accept-count=1000

  -Dserver.tomcat.max-threads=300

  -Dserver.tomcat.min-spare-threads=65

  -Dserver.tomcat.accesslog.enabled=false

  -Dserver.tomcat.accesslog.directory=/data/liuch/log/

  -Dserver.tomcat.accesslog.prefix=access_log

  -Dserver.tomcat.accesslog.pattern=combine

  -Dserver.tomcat.accesslog.suffix=.log

  -Dserver.tomcat.accesslog.rotate=true

  -Dserver.tomcat.accesslog.rename-on-rotate=true

  -Dserver.tomcat.accesslog.request-attributes-enabled=true

  -Dserver.tomcat.accesslog.buffered=true

  -XX:NewRatio=4 -XX:SurvivorRatio=30 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=8 -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:ParallelGCThreads=24 -XX:ConcGCThreads=24 -XX:-UseGCOverheadLimit -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSFullGCsBeforeCompaction=1 -XX:+CMSParallelRemarkEnabled -XX:+CMSScavengeBeforeRemark -XX:+ParallelRefProcEnabled -XX:+UseCMSCompactAtFullCollection -XX:CMSMaxAbortablePrecleanTime=6000 -XX:CompileThreshold=10 -XX:MaxInlineSize=1024 -Dsun.net.client.defaultConnectTimeout=60000

  -Dsun.net.client.defaultReadTimeout=60000

  -Dnetworkaddress.cache.ttl=300 -Dsun.net.inetaddr.ttl=300

  -Djsse.enableCBCProtection=false

  -Djava.security.egd=file:/dev/http://www.jb51.net/program/urandom

  -Dfile.encoding=UTF-8

  -Dlog.path=/data/liuch/log/

  -Dspring.profiles.active=online

  /data/liuch/deploy/xxxx.jar zcmweb