WebService -- Java 实现之 CXF ( 使用Spring添加拦截器)
最重要的就是在ApplicationContext.xml下面添加配置
<!-- service provider --> <jaxws:endpoint implementor="#helloWorld" address="/HelloWorld"> <!-- in Interceptor--> <jaxws:inInterceptors> <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/> </jaxws:inInterceptors> <!-- out Interceptor --> <jaxws:outInterceptors> <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/> </jaxws:outInterceptors> </jaxws:endpoint>