项目启动时报错实体类找不到

报错原因:@ApiModel(value="userVO")            dataType = "UserVO"          两个名称不一致,导致没有对应起来,首字母一个大写,一个小写

解决方法:接口中的    dataType = "UserVO"   的dataType 的值

                  和实体类的    @ApiModel(value="UserVO")   的value的值要一致

@ApiModel(value="UserVO")
public class UserVO {}



@ApiOperation(value = "获取用户信息", notes = "获取用户信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userVO", value = "用户参数", required = false, dataType = "UserVO", paramType = "body"),
            @ApiImplicitParam(name = "Accept", value = "接收属性", required = true, dataType = "String", paramType = "header", defaultValue = "application/json"),
            @ApiImplicitParam(name = "Accept-Charset", value = "接收字符集", required = true, dataType = "String", paramType = "header", defaultValue = "utf-8"),
            @ApiImplicitParam(name = "Content-Type", value = "内容类型", required = true, dataType = "String", paramType = "header", defaultValue = "application/json; charset=UTF-8") })
    @RequestMapping(value = "/org/user", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @InterfaceApiLabel(value = "001", description = "获取用户信息")
    public List mergeUser(@RequestBody UserVO userVO, @RequestHeader HttpHeaders headers) {
        return null;
    }

 

你可能感兴趣的:(项目启动时报错实体类找不到)