[Spring Boot]Request method 'GET' not supported

在网上查了些资料没有解决,检查代码发现

    @PostMapping
public String add(Employee employee){ System.out.println(employee); return "redirect:/emps"; }

@PostMapping忘了写路径了(;д;),加上路径就好了

 

posted @ 2018-12-31 10:05  ApolloAI  阅读(1687)  评论(0编辑  收藏  举报