问题描述
我正在使用 Spring Boot 进行培训,我想调用一个返回 JSON 的 GET 类型的 Web 服务,我只想检索响应的状态以便稍后使用
有可能吗?
这是我的代码的一部分:
ResponseEntity<String> responseEntity = getUser(username);
功能:
@GetMapping("/users")
public ResponseEntity<String> getUser(@RequestParam("username") String username) {
//if(ResponseEntity.ok().build().)}
谁能帮我完成这个逻辑?
非常感谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)