请求方式:
当前域地址:http://192.168.1.78:9080/testGit/
(index):1 Failed toload http://192.168.1.78:8800/bronzecoll/share/shareNews?id=1: No'Access-Control-Allow-Origin' header is present on the requested resource.Origin 'http://192.168.1.78:9080' is therefore not allowed access.
请求服务端地址:http://192.168.1.78:8800/bronzecoll/share/shareNews?id=1
服务端配置:
Controller头部配置注解:@CrossOrigin(origins = "*", maxAge = 3600)//跨越请求配置
数据获取就正常了
怎么样,很简单吧!第一次使用记录下来。