自己给自己整无语了。 原因: 项目以前编译打包过,target文件夹下面有application.properties文件 解决方法: 删除targer重新编译或者单独删除target/classes/application.properties即可