application.properties filtering is not working with spring.config.location

Viewed 69

I just tumbled upon a problem and I can not find any clues to solving it. Here is the problem, if I use spring.config.location to set a directory when running mvn spring-boot:run command like so
mvn spring-boot:run -Dspring.config.location=C:/conf/
then properties do not get filtered. But if I do not declare spring.config.location and put application properties under resources folder then properties do get filtered. The said property I want to filter is a pom.xml tag which is project version and I've put it on application.properties folder as my.project.version = @project.version@. To be more precise, I get 0.0.0-RC2 when I don't declare a config location but I get @project.version@ when I move my configurations to a location not under the project.

I am using spring-boot-starter-parent version 2.5.6 as parent in my pom.xml

0 Answers
Related