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
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.