异步请求后台方法,查询所有新房源信息
报错:has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
后台查询所有新房源方法
网上说的加上@CrossOrigin,SpringMVC配置文件配置跨域请求,谷歌浏览器快捷放式,目标后面加上空格 --allow-file-access-from-files都没用,这个问题怎么解决,产生的原因是什么??????
mvc:cors
<!-- allowed-methods="*" --> <!-- 表示所有请求都有效 -->
allowed-methods="POST, GET, OPTIONS, DELETE, PUT"
allowed-headers="Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"
allow-credentials="true" />
/mvc:cors
为什么端口是8080却报8090的跨域?
在路径前加上http://试试