This is the code that I'm using to reading the application.properties file in a gradle project.
@PropertySource("${spring.profiles.active}/application.properties")
My file is located inside resources/local/application.properties
This is how I'm trying to run the application in IntelliJ
This is the error that I end up getting.
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.example.core.Application]; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.profiles.active' in value "${spring.profiles.active}/application.properties"
Can someone help me fix this and read the correct config.