Environment:
Spring MVC : 4.1.7.RELEASE
CXF: 3.0.0
java: 1.8
web.xml --- loads appContext.xml (spring cofigs) & cxfContext.xml (configs for cxf)
spring-servlet.xml --- loading the spring mvc configs.
I'm using the below way to load the properties file.
@Configuration
@PropertySource(value = { "classpath:config.properties" })
public class Configuration {
@Bean
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
return new PropertySourcesPlaceholderConfigurer();
}
}
Properties are getting resolved and no issues except in one case.
I'm using CXF for webservices and the address property is not getting resolved when "${addressVal}"
is used. All other properties inside the xml are gettign loaded except for "jaxws:client"
.
<jaxws:client id="port"
serviceClass="com.service.Myclass"
address="${addressVal}" />
Where is the problem. What I'm doing wrong.
Problem with servlet context / application context loading ?
Please advice.
PropertySourcesPlaceholderConfigurer
. – TarantoContextLoaderListener
and aDispatcherServlet
you have 2 contexts, if the properties are loaded in 1 and the cxc stuff in the other your properties aren't available. – Taranto