spring mvc - @Value annotation not working with wink resource -
i trying put url in wink resource property file have in spring.
when trying use spring @value annotation access property, getting null.
wink says using property in wink, need configure custom property bean referenced here http://wink.apache.org/1.0/html/5.5%20spring%20integration.html .
but again not working. think half information.
i want use property defined in properties file
spring.properties my.server.url=http://xx:xx
in resource using
myresource.java @value("${my.server.url}") private string myserverurl;
getting myserverurl null.
take care of 2 things
your spring bean xml file , wink context xml should in same contextconfiglocation
do not register classes in registrar bean setter.
you able access properties spring properties fine.
Comments
Post a Comment