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

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

javascript - Create websocket without connecting -

android - Linear layout children not scrolling -