springboot vue this.$axios.post 请求不到
没有写请求体 就不会请求到,然而他的log还是会打,我还以为参数没问题。。
this.$axios.post(‘/selectTableNames’).then(resp => {
console.log(resp)
实际上需要请求体
this.$axios.post(‘/selectTableNames’,{}).then(resp => {
@PostMapping("/api/selectTableNames")
public Result selectTableNames(@RequestBody User requestUser) {
// userService.editUser(requestUser);
List<Map<String, Object>> maps = userDAO.selectTableNames("wj", "base table");
System.out.println(maps);
log.info("selectTableNames");
log.info("maps {}",maps);
return ResultFactory.buildSuccessResult(maps);
}