Tag Archives: openfign

The second parameter of openfit duplicate mapping and openfit interface method is bindingresult Error

Openalign duplicate mapping

Ambiguous mapping

As long as there is a controller annotation or requestmapping annotation on the class, it will be registered on both sides

APIs and subclasses are registered multiple times

Solution: move requsstmapping to a subclass method

The feign interface can use the path parameter

The second parameter of openalign interface method is bindingresult, and an error is reported

The reason is that if the second parameter is not annotated, it defaults to @requestbody

    @ApiOperation(value = "user-information-update", notes = "user-information-update", httpMethod = "POST")
    @PostMapping("/updateUserInfo")
    public GraceJSONResult updateUserInfo(@RequestBody @Valid UpdateUserBO updateUserBO, BindingResult bindingResult);

Equivalent to

    @ApiOperation(value = "user-information-update", notes = "user-information-update", httpMethod = "POST")
    @PostMapping("/updateUserInfo")
    public GraceJSONResult updateUserInfo(@RequestBody @Valid UpdateUserBO updateUserBO, @RequestBody BindingResult bindingResult);

Openalign does not allow two requestbodies