修正swagger没有指定dataTypeClass导致启动出现warn日志
正在显示
1 个修改的文件
包含
6 行增加
和
6 行删除
| @@ -47,7 +47,7 @@ public class TestController extends BaseController | @@ -47,7 +47,7 @@ public class TestController extends BaseController | ||
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | @ApiOperation("获取用户详细") | 49 | @ApiOperation("获取用户详细") |
| 50 | - @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path") | 50 | + @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class) |
| 51 | @GetMapping("/{userId}") | 51 | @GetMapping("/{userId}") |
| 52 | public AjaxResult getUser(@PathVariable Integer userId) | 52 | public AjaxResult getUser(@PathVariable Integer userId) |
| 53 | { | 53 | { |
| @@ -63,10 +63,10 @@ public class TestController extends BaseController | @@ -63,10 +63,10 @@ public class TestController extends BaseController | ||
| 63 | 63 | ||
| 64 | @ApiOperation("新增用户") | 64 | @ApiOperation("新增用户") |
| 65 | @ApiImplicitParams({ | 65 | @ApiImplicitParams({ |
| 66 | - @ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer"), | ||
| 67 | - @ApiImplicitParam(name = "username", value = "用户名称", dataType = "String"), | ||
| 68 | - @ApiImplicitParam(name = "password", value = "用户密码", dataType = "String"), | ||
| 69 | - @ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String") | 66 | + @ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class), |
| 67 | + @ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class), | ||
| 68 | + @ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class), | ||
| 69 | + @ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class) | ||
| 70 | }) | 70 | }) |
| 71 | @PostMapping("/save") | 71 | @PostMapping("/save") |
| 72 | public AjaxResult save(UserEntity user) | 72 | public AjaxResult save(UserEntity user) |
| @@ -95,7 +95,7 @@ public class TestController extends BaseController | @@ -95,7 +95,7 @@ public class TestController extends BaseController | ||
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | @ApiOperation("删除用户信息") | 97 | @ApiOperation("删除用户信息") |
| 98 | - @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path") | 98 | + @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class) |
| 99 | @DeleteMapping("/{userId}") | 99 | @DeleteMapping("/{userId}") |
| 100 | public AjaxResult delete(@PathVariable Integer userId) | 100 | public AjaxResult delete(@PathVariable Integer userId) |
| 101 | { | 101 | { |
-
请 注册 或 登录 后发表评论