前後端分離 ajax java跨域配置 spring boot 、 spring security

實現這個類 並給類加@Configure註解 其中allowedMethods中根據需要設置 一般來說GET/POST/OPTIONS即可 接下來是spring security配置 沒有就不用配了 紅框部分是關鍵 主要是關閉跨域攔截
相關文章
相關標籤/搜索