java - Springframework and @Value with placeholder -


i have annotated service in jar, included in webapp.

the service has properties valued @value annotation, uses placeolders. property-placeholder defined in webapp, not in jar. problem @ runtime placeholders not resolved.

this example. in jar:

@service public class myservice {    @value("${property.myvalue}")    private myvalue; } 

in war applicationcontext:

<context:property-placeholder location="classpath:myprops.properties"/> 

naturally myprops.properties exists in war , loaded (i tried remove , obtain explicit file not found error).

moreover, unit test myprops.properties in test classpath passed.

is there classpath issue?


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -