jersey配置跨域请求问题 -- 求解

风中小萌 2016-04-27

web.xml配置如下:

        <servlet-name>Jersey REST Service</servlet-name>

        <!-- <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>-->

        <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class> 

        <init-param>

            <param-name>jersey.config.server.provider.classnames</param-name>

            <param-value>com.hj.rest.damon.CorsResponseFilter</param-value>

       </init-param>

 

 

xrxwxf002 2016-05-16
.header("Access-Control-Allow-Origin", "*")


Response 添加如上的header
Global site tag (gtag.js) - Google Analytics