No active profile set, falling back to default profiles: default
Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applicationProperty': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'application.name' in value "${application.name}"
由于没有在application.yml中
spring:
profiles:
active: prod
这样就解决了这个问题。
还有要在pom.xml文件添加如下:
在build这个目录下增加如下两个:
<finalName>springbootdemoproperties</finalName>
<resource>
<resource>
<directory>src/main/resources
<filtering>true</filtering>
</resource>
<resource>
不然也会出现以上这个错误。