最近要重构一个基于spring boot的后端API服务,需要再本地测试.在本地测试时,运行在本地的前端页面发送一个ajax请求访问后端API,然后浏览器报错blocked CORS policy. Access to XMLHttpRequest at 'http://127.0.0.1:1234/api/' from origin 'http://dev.couchbase.cloud.qiyi.domain' has been blocked by CORS policy: No 'Acc
如果为action配置了类,那么默认就会执行Action类的excute方法,Action类的写法三种: ① public class Action1 { public String execute(){ return "abc";//根据返回结果,去xml文件中找name与之匹配的result } } ② import com.opensymphony.xwork2.Action;//ActionSupport类实现了该接口 public class