企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
[TOC] # 参数绑定 ## get方式 `localhost:8080/hello/1994` ~~~ @GetMapping("hello/{id}") @ResponseBody public String hello(@PathVariable("id") Integer id) { return "spring boot " + id; } ~~~ `localhost:8080/hello?name=x` ~~~ @GetMapping("hello") @ResponseBody public String hello(@RequestParam(value = "name", required = false, defaultValue = "111") Integer id) { return "spring boot " + id; } ~~~