修改配置文件
在axios中如果请求的是
http://localhost:8080/ssm/save
添加后改成
/api/save
module.exports = {
devServer:{
port:10000, // 启动端口
proxy:{
'/api':{
target:'http://localhost:8080/ssm',
changeOrigin: true,
pathRewrite:{
'/api':''
}
}
}
}
}