springboot java -jar指定启动的jar外部配置文件

 

 

 

Limited Setting Effect 中文描述
Java 8 -Xbootclasspath:<path> Sets the search path for bootstrap classes and resources.

设置引导类和资源的搜索路径。

不常用,否则要重新写所有Java 核心class

Java 8 -Xbootclasspath/p:<path> Prepends the specified resources to the front of the bootstrap class path.

将指定的资源放在引导类路径的前面。一般用来增加jar内除外的配置,增加的配置会被jar中的配置文件覆盖。

不常用,避免
引起不必要的冲突.

 

Java 8 -Xbootclasspath/a:<path> Appends the specified resources to the end of the bootstrap class path. 将指定的资源附加到引导类路径的末尾。  一般用来覆盖jar内原有的配置。

 

java -jar -Xbootclasspath/a:./config /ccc.jar param1 param2

 

来源:

-Xbootclasspath

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章