Tomcat下的配置下载cors-filter-1.7.jar,java-property-utils-1.9.jar这两个库文件,放到lib目录下。
(可在http://search.maven.org上查询并下载。
)工程项目中web.xml中的配置如下:[html]viewplaincopy在CODE上查看代码片派生到我的代码片CORScom.thetransactioncompany.cors.CORSFiltercors.allowOrigin*cors.supportedMethodsGET,POST,HEAD,PUT,DELETEcors.supportedHeadersAccept,Origin,X-Requested-With,Content-Type,Last-Modifiedcors.exposedHeadersSet-Cookiecors.supportsCredentialstrueCORS/*
2025/7/9 18:27:51
28KB
跨域
1