1、使用命令行参数 java -jar your-app.jar --spring.config.location=file:/path/to/application.properties --logging.file=/path/to/logs/your-app.log 在上述命令中,--spring.config.location参数用于指定配置文件的位置,--logging.file参数用于指定日志文件的位置。 2、使用环境变量 export SPRING_CONFIG_LOCA...