1、vue.config.js
中引入代理服务器:
devServer: {
proxy:'http://localhost:5000',
}
即,如果代理服务器发起请求,且想要向/students
请求服务,那么设置请求获取的地址为'http://localhost:5000'
2、
axios.get("http://localhost:8080/students").
1、vue.config.js
中引入代理服务器:
devServer: {
proxy:'http://localhost:5000',
}
即,如果代理服务器发起请求,且想要向/students
请求服务,那么设置请求获取的地址为'http://localhost:5000'
2、
axios.get("http://localhost:8080/students").