close

[Solved] Property ‘spring.profiles.active’ imported from location ‘class path resource [application-dev.yml]’ is invalid in a profile specific resource

Hello Guys, How are you all? Hope You all Are Fine. Today I am creating Spring cloud application And In startup of application I am facing following error ERROR org.springframework.boot.SpringApplication – Application run failed org.springframework.boot.context.config.InvalidConfigDataPropertyException: Property ‘spring.profiles.active’ imported from location ‘class path resource [application-dev.yml]’ is invalid in a profile specific resource in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How This Error Occurs ?

I am creating Spring cloud application And In startup of application I am facing following error.

[main] ERROR org.springframework.boot.SpringApplication – Application run failed org.springframework.boot.context.config.InvalidConfigDataPropertyException: Property ‘spring.profiles.active’ imported from location ‘class path resource [application-dev.yml]’ is invalid in a profile specific resource [origin: class path resource [application-dev.yml] from skyshop-mail-1.0.jar – 42:17] at org.springframework.boot.context.config.InvalidConfigDataPropertyException.lambda$throwOrWarn$1(InvalidConfigDataPropertyException.java:125)

How To Solve Property ‘spring.profiles.active’ imported from location ‘class path resource [application-dev.yml]’ is invalid in a profile specific resource Error ?

  1. How To Solve Property ‘spring.profiles.active’ imported from location ‘class path resource [application-dev.yml]’ is invalid in a profile specific resource Error ?

    To Solve Property ‘spring.profiles.active’ imported from location ‘class path resource [application-dev.yml]’ is invalid in a profile specific resource Error You just need to rename application-dev.yml to application-local.yml and use local profile. Thats it and now your error will be solve. Second solution In this solution you need to change spring.profiles.active to dev in application-dev.yml file and now your error will be fix.

  2. Property ‘spring.profiles.active’ imported from location ‘class path resource [application-dev.yml]’ is invalid in a profile specific resource

    To Solve Property ‘spring.profiles.active’ imported from location ‘class path resource [application-dev.yml]’ is invalid in a profile specific resource Error You just need to rename application-dev.yml to application-local.yml and use local profile. Thats it and now your error will be solve. Second solution In this solution you need to change spring.profiles.active to dev in application-dev.yml file and now your error will be fix.

Solution 1: rename application-dev.yml

You just need to rename application-dev.yml to application-local.yml and use local profile. Thats it and now your error will be solve.

Solution 2: change spring.profiles.active

In this solution you need to change spring.profiles.active to dev in application-dev.yml file and now your error will be fix.

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment