Commit 2d2c04c4 authored by xiemouren's avatar xiemouren

调整控制层模板

parent 106fb729
...@@ -2,6 +2,8 @@ package ${package.Controller}; ...@@ -2,6 +2,8 @@ package ${package.Controller};
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.GetMapping;
<#if restControllerStyle> <#if restControllerStyle>
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -11,6 +13,8 @@ import org.springframework.stereotype.Controller; ...@@ -11,6 +13,8 @@ import org.springframework.stereotype.Controller;
<#if superControllerClassPackage??> <#if superControllerClassPackage??>
import ${superControllerClassPackage}; import ${superControllerClassPackage};
</#if> </#if>
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/** /**
* ${table.comment!} 控制层 * ${table.comment!} 控制层
...@@ -18,6 +22,7 @@ import ${superControllerClassPackage}; ...@@ -18,6 +22,7 @@ import ${superControllerClassPackage};
* @author ${author} * @author ${author}
* @since ${date} * @since ${date}
*/ */
@Api(value = "${table.comment!}", tags = {"${table.comment!}"})
<#if restControllerStyle> <#if restControllerStyle>
@RestController @RestController
<#else> <#else>
...@@ -33,5 +38,17 @@ public class ${table.controllerName} extends ${superControllerClass} { ...@@ -33,5 +38,17 @@ public class ${table.controllerName} extends ${superControllerClass} {
public class ${table.controllerName} { public class ${table.controllerName} {
</#if> </#if>
@ApiOperation("DemoPost接口")
@PostMapping("/post")
public void post() {
}
@ApiOperation("DemoGet接口")
@GetMapping("/get")
public void get() {
}
} }
</#if> </#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