修正swagger没有指定dataTypeClass导致启动出现warn日志

This commit is contained in:
RuoYi 2021-09-29 19:51:48 +08:00
parent 25f50d74c5
commit 5477ce3c39
1 changed files with 6 additions and 6 deletions

View File

@ -47,7 +47,7 @@ public class TestController extends BaseController
} }
@ApiOperation("获取用户详细") @ApiOperation("获取用户详细")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path") @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
@GetMapping("/{userId}") @GetMapping("/{userId}")
public AjaxResult getUser(@PathVariable Integer userId) public AjaxResult getUser(@PathVariable Integer userId)
{ {
@ -63,10 +63,10 @@ public class TestController extends BaseController
@ApiOperation("新增用户") @ApiOperation("新增用户")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer"), @ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "username", value = "用户名称", dataType = "String"), @ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
@ApiImplicitParam(name = "password", value = "用户密码", dataType = "String"), @ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
@ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String") @ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
}) })
@PostMapping("/save") @PostMapping("/save")
public AjaxResult save(UserEntity user) public AjaxResult save(UserEntity user)
@ -95,7 +95,7 @@ public class TestController extends BaseController
} }
@ApiOperation("删除用户信息") @ApiOperation("删除用户信息")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path") @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
@DeleteMapping("/{userId}") @DeleteMapping("/{userId}")
public AjaxResult delete(@PathVariable Integer userId) public AjaxResult delete(@PathVariable Integer userId)
{ {