sprinboot启动使用外部配置文件
--启动java,使用当前目录apiadressconfig.properties 配置
java -jar xxxxx-0.0.1-SNAPSHOT.jar -apiadressconfig.properties=file:./apiadressconfig.properties
--java代码,本地使用一个文件,正式上线使用一个文件
@PropertySource("classpath:apiadressconfig.properties")
@PropertySource(value = "${apiadressconfig.properties}", ignoreResourceNotFound = true)

浙公网安备 33010602011771号