class CertificateController implements ReactiveServiceCrudController<CertificateEntity, String> {

    @Autowired
    private CertificateService certificateService;

    @Override
    public CertificateService getService() {
        return certificateService;
    }

    @Autowired(required = false)
    DataBufferFactory factory = new DefaultDataBufferFactory();

    @GetMapping("/{id}/detail")
    @QueryAction
    @Operation(summary = "查看证书信息")
    public Mono<String> getCertificateInfo(@PathVariable String id) {
        return certificateService
            .getCertificate(id)
            .map(Certificate::toString);
    }

    @SaveAction
    @PostMapping("/upload")
    @SneakyThrows
    @Operation(summary = "上传证书并返回证书BASE64")
    public Mono<String> upload(@RequestPart("file")
                               @Parameter(name = "file", description = "文件") Part part) {<FILL_FUNCTION_BODY>}
}


        if (part instanceof FilePart) {
            return (part)
                .content()
                .collectList()
                .flatMap(all -> Mono.fromCallable(() ->
                    Base64.encodeBase64String(StreamUtils.copyToByteArray(factory.join(all).asInputStream()))))
                ;
        } else {
            return Mono.error(() -> new IllegalArgumentException("[file] part is not a file"));
        }

    
<no_super_class>