We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
示例代码:
@RestController @RequestMapping("api") public class DemoController { @GetMapping(value = "user") @PostMapping(value = "user1") public String case1() { return "user"; } }
实际截图
The text was updated successfully, but these errors were encountered:
虽然但是,这样springboot会识别吗,写当然没问题
Sorry, something went wrong.
对,Spring 只会识别第一个😂,我之前提过 pr 支持过的 rose 框架,是可以同时标记 Get Post ,是我搞错了。
正确写法应该是类似这样
@RequestMapping(value = "user", method = { RequestMethod.GET, RequestMethod.POST }) public String case1() { return "user"; }
这样的话,感觉 Spring 的确实没必要改。rose 的后面我提交个 pr 吧?
spring的没有必要了,spring倒是支持多path,
关键现在github上的分支不维护了,提了pr不好合,等我把代码整理一遍就可以提了
No branches or pull requests
示例代码:
实际截图
The text was updated successfully, but these errors were encountered: