spring-mvc.xml配置文件
<!--
支持跨域
allow-credentials="true"创建session对话
OPTIONS的目的是如果有axios发送请求的话就会先发送OPTION然后在具体的使用GET或者POST
-->
<mvc:cors>
<mvc:mapping path="/**"
allowed-origins="http://localhost:8080,http://127.0.0.1:8080"
allowed-methods="GET,POST,PUT,DEL