需要在web工程中的web。xml中增加如下配置
<!-- ***注:如出現找不到CORSFilter對應類 在built path中 加入 cors-filter-1.7 java-property-utils-1.9 兩個jar包-->
<filter>
CorsFilter
com.thetransactioncompany.cors.CORSFilter
CorsFilter
/*
並且增加兩個jar包
cors-filter-1.7.jar
java-property-utils-1.9.jar