<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jaxrs="http://cxf.apache.org/jaxrs"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
  classpath:/org/springframework/beans/factory/xml/spring-beans-4.2.xsd
  http://cxf.apache.org/jaxrs
  http://cxf.apache.org/schemas/jaxrs.xsd">

    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
    <!--&lt;!&ndash;扫描service下的包&ndash;&gt;-->
    <!--<context:component-scan base-package="com.tohi.app.rest"/>-->
    <jaxrs:server id="pitaskSerice" address="/">
        <jaxrs:serviceBeans>
            <ref bean="pitaskSericeImpl" />
        </jaxrs:serviceBeans>

        <jaxrs:providers>
            <bean class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider" />
            <bean class="org.apache.cxf.jaxrs.provider.jsonp.JsonpPreStreamInterceptor" />
            <bean class="com.tohi.common.pwdutil.CheckRequestFilter" />
        </jaxrs:providers>

        <jaxrs:inInterceptors>
            <!-- <bean class="org.apache.cxf.jaxrs.provider.jsonp.JsonpInInterceptor" /> -->
            <bean class="org.apache.cxf.jaxrs.provider.jsonp.JsonpInInterceptor">
                <property name="callbackParam" value="callback"/>
            </bean>
        </jaxrs:inInterceptors>

        <jaxrs:outInterceptors>
            <bean
                    class="org.apache.cxf.jaxrs.provider.jsonp.JsonpPostStreamInterceptor" />
        </jaxrs:outInterceptors>


    </jaxrs:server>
</beans>