spring - what is the "default applicationContext" in Jersey? -
i using bailiwick of jersey perform acceptance tests on restful web services. appears though applicationcontext.xml not beingness loaded when client loads. see next log output:
info: using default applicationcontext
is "default" file soemthing bailiwick of jersey loads when cannot find file? or indicate file found?
@contextconfiguration(locations={"/applicationcontext.xml", "/applicationcontexttest.xml"}) public class baseresourcetest extends jerseytest { final static uri baseuri = uribuilder.fromuri( "http://localhost" ).port( 9998 ).build(); public baseresourcetest() throws exception { super(new webappdescriptor.builder("xxx.yyy.zzz").contextpath(baseuri.getpath()) .contextparam( springservlet.context_config_location, "classpath:applicationcontexttest.xml" ) .servletclass(springservlet.class ) .contextlistenerclass( contextloaderlistener.class ) .build()); } ....... tests ....... }
my web.xml:
<context-param> <param-name>contextconfiglocation</param-name> <param-value>classpath:applicationcontext.xml</param-value> </context-param> <listener> <listener-class>xxx.yyy.loggingassurancelistener</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.contextloaderlistener</listener-class> </listener> <servlet> <servlet-name>jersey-servlet</servlet-name> <servlet-class>com.sun.jersey.spi.spring.container.servlet.springservlet</servlet-class> <init-param> <param-name>com.sun.jersey.config.property.packages</param-name> <param-value>xxx.yyy.zzzz</param-value> </init-param> <init-param> <param-name>com.sun.jersey.api.json.pojomappingfeature</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>com.sun.jersey.config.property.wadlgeneratorconfig</param-name> <param-value>xxx.yyy.zzz.broadsoftwadlgeneratorconfig</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>jersey-servlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping>
spring jersey
No comments:
Post a Comment