Spring CXF 在web.xml中的配置
1.Spring 配置有如下两种方式
??? 1)
??? ?<context-param>
?????? <param-name>contextConfigLocation</param-name>
?????? <param-value>/WEB-INF/applicationContext.xml</param-value>
??? </context-param>
?
??? <listener>
?????? <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
??? </listener>
?? 2)
??? <servlet>
??????? <servlet-name>dispatcherServlet</servlet-name>
??????? <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
??????? <init-param>
??????????? <param-name>contextConfigLocation</param-name>
??????????? <param-value>/WEB-INF/applicationContext</param-value>
??????? </init-param>
??? </servlet>
2.CXF 的配置 web.xml中配置
? <servlet>
??? <servlet-name>CXFServlet</servlet-name>
??? <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
??? <load-on-startup>1</load-on-startup>
? </servlet>
? <servlet-mapping>
??? <servlet-name>CXFServlet</servlet-name>
??? <url-pattern>/ws/*</url-pattern>
? </servlet-mapping>
?
?
?