The difference is that only the corresponding interface, there is no main function to set a name in Web. XML, and then introduce the CFX related servlet corresponding class definition a servlet, when accessing this servlet, will go to its path
Define a spring configuration file
1. Declaration 1. Xmlns:jaxws= "Http://cxf.apache.org/jaxws"//soap style to be cited in the package xmlns:jaxrs= "HTTP://CXF. Apache.org/jaxrs "//restful style 2. Http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd Http://cxf.apache.org/jaxrs http://cx F.apache.org/schemas/jaxrs.xsd 2. <import resource= "Classpath:meta-inf/cxf/cxf.xml"/> <jaxws:endpoint id= "HelloWorld" implementor = "Com.atguigu.cxf.spring.HelloWorldImpl" address= "/helloworld" >//implementor implement class full path, define address relative addresses </j axws:endpoint> <jaxrs:server id= "customerservice" address= "/custservice" > &L
t;jaxrs:servicebeans> <bean class= "Com.atguigu.service.CustomerService"/>
</jaxrs:serviceBeans> </jaxrs:server> 2.