All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kotlin-spring.apiController.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
package {{package}};

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.Optional;
{{>generatedAnnotation}}

@Controller
{{=<% %>=}}
@RequestMapping("\${openapi.<%title%>.base-path:<%>defaultBasePath%>}")
<%={{ }}=%>
{{#operations}}
class {{classname}}Controller(
        @org.springframework.beans.factory.annotation.Autowired(required = false) delegate: {{classname}}Delegate?
) : {{classname}} {
    private val delegate: {{classname}}Delegate

    init {
        this.delegate = Optional.ofNullable(delegate).orElse(object : {{classname}}Delegate {})
    }

    override fun getDelegate(): {{classname}}Delegate = delegate
}
{{/operations}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy