1、可能是因为@占位符需要加上双引号或着单引号; '@profile.spring@' 2、可能是因为idea暂时没有识别出来maven项目,需要操作如下: 右键项目中的pom.xml--maven--report,就好了: image.png