Property 'spring.profiles.active' imported from location 'class path resource [application-dev.yml]' is invalid
Solution 1:
Spring Boot 2.4 has improved the way that application.properties and application.yml files are processed.
See here for details: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-Config-Data-Migration-Guide
Long story short: If you have for example an application-local.yml and inside you defined
spring:
profiles:
active: local
then just remove this entry in the yaml file.
Solution 2:
No need to mention spring.profiles.active property if file name is application-dev.yml ( spring boot new version )
Solution 3:
In your application-dev.yml, you declare :
spring:
application:
name: mail-service
profiles:
active: local
2 solutions :
- rename application-dev.yml to application-local.yml and use local profile
- change spring.profiles.active to dev in application-dev.yml