templates.java-micronaut.server.controller-implementation.mustache Maven / Gradle / Ivy
{{>common/licenseInfo}}
package {{controllerPackage}};
import io.micronaut.http.annotation.Controller;
{{#generateOperationsToReturnNotImplemented}}
import io.micronaut.http.HttpStatus;
import io.micronaut.http.exceptions.HttpStatusException;
{{/generateOperationsToReturnNotImplemented}}
{{#reactive}}
import reactor.core.publisher.Mono;
import reactor.core.publisher.Flux;
{{/reactive}}
{{#wrapInHttpResponse}}
import io.micronaut.http.HttpResponse;
{{/wrapInHttpResponse}}
import {{package}}.{{classname}};
{{#imports}}
import {{import}};
{{/imports}}
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
{{#generateControllerFromExamples}}
import java.util.Arrays;
{{/generateControllerFromExamples}}
@Controller
public class {{controllerClassname}} implements {{classname}} {
{{#operations}}
{{#operation}}
{{!the method definition}}
@Override
public {{^returnType}}void{{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}} {{nickname}}({{#allParams}}{{{vendorExtensions.typeWithGenericAnnotations}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) {
{{>server/controllerOperationBody}} }
{{^-last}}
{{/-last}}
{{/operation}}
{{/operations}}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy