Home > Software design >  IntelliJ - Some application properties are grayed out and unused
IntelliJ - Some application properties are grayed out and unused

Time:07-14

I have Spring Boot application which uses application properties files like so:

in src/resources:

  • application.properties
  • application-dev.properties
  • application-prod.properties

in test/resources:

  • application-test.properties

However, the problem I have is that most of the properties set in application-test.properties file and greyed out and marked as Unused properties

enter image description here

CodePudding user response:

Turns out when you add resources folder to your test, you have to right-click on it > Mark Directory as > Test Resources Root.

After this, my properties are neither greyed out nor marked as unused.

  • Related