[Spring Boot]Request method 'GET' not supported

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

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

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

猜你喜欢

转载自www.cnblogs.com/ApolloAI/p/10201469.html