Tirmean
Tirmean

Reputation: 408

Issue loading properties file in spring

spring app context file and application.properties files are located under:

src/main/resources/META-INF/spring

When I try to load properties file:

<context:property-placeholder local-override="true" location="classpath:/META_INF/spring/application.properties"/>

Getting error:

class path resource [META_INF/spring/application.properties] cannot be opened because it does not exist

I also tried:

<context:property-placeholder local-override="true" location="classpath:application.properties"/>

<context:property-placeholder local-override="true" location="application.properties"/>

Upvotes: 0

Views: 260

Answers (1)

Nick Vasic
Nick Vasic

Reputation: 1896

Try:

<context:property-placeholder local-override="true" location="classpath:/META-INF/spring/application.properties"/>

instead of:

<context:property-placeholder local-override="true" location="classpath:/META_INF/spring/application.properties"/>

Upvotes: 1

Related Questions