我正在处理一个带有rest api的java springboot项目,我需要在其中一个uri中传递参数,当我使用这个方法时,我得到了"request method GET not supported“from={from}&to={to}",method=RequestMethod.Get)
public list getLogs(@RequestParam(value="from") String
在下面给出的Get请求方法中,我想检查请求中是否提供了多个参数。它只允许使用三个可能的参数中的一个,当超过一个参数时,我将抛出一个错误。@GetMapping()
public List<Offer> getOffers(@RequestParam(required = false) String title
我有一个端点,它列出了对象,并通过添加的请求参数对其进行查询。有些值是可选的。当筛选值的数量增加时,代码看起来更加丑陋。我正在寻找一个解决方案,看起来也很好。type=1&from=x&to=y&userId=z&adminId@RequestMapping(value = "/action")
public List<Actions>