@Filters({@By(type=CrossOriginFilter.class)})
@Ok("forward:/login.html")
public String test(){
return "111";
}
这个是服务端代码
$('#myIframe').load('http://192.168.0.113:8080/user/test')
这个是访问代码
index.html:1 Failed to load http://192.168.0.113:8080/user/test: Redirect from 'http://192.168.0.113:8080/user/test' to 'http://192.168.0.113:8080/login.html;JSESSIONID=1edefded-1f37-465f-b562-1e69b2bb6f23' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8020' is therefore not allowed access.
这个是错误信息