fix - 防止网站攻击

This commit is contained in:
2026-06-11 21:04:37 +08:00
parent a7475ccc9a
commit 81bf02794c
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ public class PlatformController extends BaseApiController {
/**
* 查询平台信息表信息
*/
@RequestMapping(value = "/platform/{id}", method = RequestMethod.GET)
@RequestMapping(value = "/platform/{id:\\d+}", method = RequestMethod.GET)
public ResponseDTO findById(@PathVariable("id") Integer id) {
return ResponseDTO.ok()
.addAttribute("platform", platformService.findById(id));

View File

@@ -37,7 +37,7 @@ public class PlatformController extends OmsController {
/**
* 查询平台信息表信息
*/
@RequestMapping(value = "/platform/{id}", method = RequestMethod.GET)
@RequestMapping(value = "/platform/{id:\\d+}", method = RequestMethod.GET)
public ResponseDTO findById(@PathVariable("id") Integer id) {
return ResponseDTO.ok()
.addAttribute("platform", platformService.findById(id));