打成 jar以后在同一级目录下放 配置文件然后用命令
java -jar -D spring.config.location=xxx.yml xxx.jar
spring.config.location 就可以 指定 配置文件地址