问题描述 在a标签中使用method="post"试图连接@PostMapping注解 出现405 原因分析: 不能a标签直接发送请求 解决方案: 使用form表单 <form th:action="@{/testPostMapping}" method="post"> <input type="submit" value="测试@PostMapping"> </form> 跳转成功