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

templates.backend.springboot.proto.ftl Maven / Gradle / Ivy

There is a newer version: 1.6.7
Show newest version
package ${packageName};

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.*;
import ${voPackageName}.*;
<#if imports??>
    <#list imports as import>
import ${import};
    


<#if base??>
@RequestMapping("${base}")

public interface ${name} {

    <#list routers as router>
    @${router.httpMethod?capitalize}Mapping("${router.endpoint}")
    ${router.respData.type} ${router.name}(
        <#assign x>
            <#if router.pathParams??>
                <#list router.pathParams as pathParam>
        <#if pathParam.required>@PathVariable("${pathParam.name}")<#else>@PathVariable(value="${pathParam.name}", required=false) ${pathParam.type} ${pathParam.name},
                
            
            <#if router.queryParams??>
                <#list router.queryParams as queryParam>
        <#if queryParam.required>@RequestParam("${queryParam.name}")<#elseif queryParam.defaultValue??>@RequestParam(value="${queryParam.name}", required=false, defaultValue="${queryParam.defaultValue}")<#else>@RequestParam(value="${queryParam.name}", required=false) ${queryParam.type} ${queryParam.name},
                
            
            <#if router.reqBody??>
        <#if router.reqBody.required>@RequestBody<#else>@RequestBody(required=false) ${router.reqBody.type} ${router.reqBody.name},
            
            <#if router.file??>
        <#if router.file.required>@RequestPart("${router.file.name}")<#else>@RequestPart(value="${router.file.name}", required=false) ${router.file.type} ${router.file.name},
            
        
        ${x?keep_before_last(",")?trim}
    );
    <#sep>

    
    

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy