Commit 2d2c04c4 authored by xiemouren's avatar xiemouren

调整控制层模板

parent 106fb729
......@@ -2,6 +2,8 @@ package ${package.Controller};
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.GetMapping;
<#if restControllerStyle>
import org.springframework.web.bind.annotation.RestController;
......@@ -11,6 +13,8 @@ import org.springframework.stereotype.Controller;
<#if superControllerClassPackage??>
import ${superControllerClassPackage};
</#if>
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* ${table.comment!} 控制层
......@@ -18,6 +22,7 @@ import ${superControllerClassPackage};
* @author ${author}
* @since ${date}
*/
@Api(value = "${table.comment!}", tags = {"${table.comment!}"})
<#if restControllerStyle>
@RestController
<#else>
......@@ -33,5 +38,17 @@ public class ${table.controllerName} extends ${superControllerClass} {
public class ${table.controllerName} {
</#if>
@ApiOperation("DemoPost接口")
@PostMapping("/post")
public void post() {
}
@ApiOperation("DemoGet接口")
@GetMapping("/get")
public void get() {
}
}
</#if>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment