18

Springfox を使用していると、ちょっとした問題が発生します。@RestController クラスに名前を設定できません。

Spring Boot と Swagger2 を使用しています。

次のコードは、springfox ui で「rest-status-controller」という名前のコントローラーを生成します。代わりに「申請ステータス」を期待していました。私が知らない別の設定はありますか?

@Api("Application Status")
@RestController
@RequestMapping("/rest/status")
public class RestStatusController {

    @ApiOperation(value="Get components current status")
    @RequestMapping(method = RequestMethod.GET, produces=MediaType.APPLICATION_JSON)
    public String global() {
    //...
    }

    @ApiOperation(value="Get mysql current status")
    @RequestMapping(value="/mysql" method = RequestMethod.GET, produces=MediaType.APPLICATION_JSON)
    public String mysql() {
    //...
    }
}
4

3 に答える 3

1

@Tags(name = "name", description = "description") OpenApi v3 による

于 2022-01-19T09:42:33.790 に答える