springmvc3.2版本的跨域处理

添加两个依赖

  
        
            com.thetransactioncompany
            cors-filter
            2.5
        
        
            com.thetransactioncompany
            java-property-utils
            1.9.1
        

在web.xml中配置

 
        CORS
        com.thetransactioncompany.cors.CORSFilter
        
            cors.allowGenericHttpRequests
            true
        
        
            cors.allowOrigin
            *
        
        
            cors.allowSubdomains
            true
        
        
            cors.supportedMethods
            GET, POST, HEAD, PUT, DELETE
        
        
            cors.supportedHeaders
            *
        
    

你可能感兴趣的:(springmvc3.2版本的跨域处理)