美文网首页
跨域问题

跨域问题

作者: wqjcarnation | 来源:发表于2023-02-27 10:28 被阅读0次

springmvc配置文件中添加如下内容:

    <!--cors跨域支持-->
<mvc:cors>
   <mvc:mapping path="/**"
         allowed-origins="http://localhost:8081"
         allowed-methods="GET,POST,PUT,DELETE,OPTIONS"
         allowed-headers="Content-Type,token"
         allow-credentials="true"
         max-age="123" />
 </mvc:cors>

相关文章

网友评论

      本文标题:跨域问题

      本文链接:https://www.haomeiwen.com/subject/xfyhldtx.html