Commit 6041186d by bianpeng

修改模板,和字段

parent b6572ef2
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<druid.version>1.1.16</druid.version> <druid.version>1.1.16</druid.version>
<mysql-connector-java.version>8.0.15</mysql-connector-java.version> <mysql-connector-java.version>8.0.18</mysql-connector-java.version>
<slf4j-api.version>1.7.26</slf4j-api.version> <slf4j-api.version>1.7.26</slf4j-api.version>
<lombok.version>1.18.6</lombok.version> <lombok.version>1.18.10</lombok.version>
<freemarker.version>2.3.28</freemarker.version> <freemarker.version>2.3.28</freemarker.version>
<!-- 打包跳过单元测试 --> <!-- 打包跳过单元测试 -->
<skipTests>true</skipTests> <skipTests>true</skipTests>
......
...@@ -29,19 +29,20 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -29,19 +29,20 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2 @EnableSwagger2
public class SwaggerConfig { public class SwaggerConfig {
@Value("${r'${server.port}'}") @Value("${swagger.enable}")
private static String port; private Boolean swagger_enable;
public static String CONTROLLER_URL="${controllerUrl}"; //Swagger扫描的接口路径 public static String CONTROLLER_URL="${controllerUrl}"; //Swagger扫描的接口路径
public static String SWAGGER_TITLE="API文档-${author}"; //Swagger接口文档标题 public static String SWAGGER_TITLE="API文档-${author}"; //Swagger接口文档标题
public static String SWAGGER_DESCRIPTION="API文档"; //Swagger接口文档描述 public static String SWAGGER_DESCRIPTION="API文档"; //Swagger接口文档描述
public static String SWAGGER_VERSION="1.0"; //Swagger接口文档版本 public static String SWAGGER_VERSION="1.0"; //Swagger接口文档版本
public final static String SWAGGER_URL="http://127.0.0.1:"+port; //Swagger项目服务的URL public final static String SWAGGER_URL="http://127.0.0.1:8080"; //Swagger项目服务的URL
//验证的页面http://127.0.0.1:8080/swagger-ui.html //验证的页面http://127.0.0.1:8080/swagger-ui.html
@Bean @Bean
public Docket createRestApi() { public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2) return new Docket(DocumentationType.SWAGGER_2)
.enable(swagger_enable)
.apiInfo(apiInfo()) .apiInfo(apiInfo())
.select() .select()
.apis(RequestHandlerSelectors.basePackage(CONTROLLER_URL)) .apis(RequestHandlerSelectors.basePackage(CONTROLLER_URL))
......
...@@ -14,8 +14,6 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -14,8 +14,6 @@ import org.springframework.web.bind.annotation.RestController;
<#if isSwagger=="true" > <#if isSwagger=="true" >
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
</#if> </#if>
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* <p>自动生成工具:mybatis-dsc-generator</p> * <p>自动生成工具:mybatis-dsc-generator</p>
* *
...@@ -31,7 +29,5 @@ import org.slf4j.LoggerFactory; ...@@ -31,7 +29,5 @@ import org.slf4j.LoggerFactory;
@RestController @RestController
@RequestMapping("/${objectName}") @RequestMapping("/${objectName}")
public class ${entityName}Controller extends AbstractController<${entityName}Service,${entityName}>{ public class ${entityName}Controller extends AbstractController<${entityName}Service,${entityName}>{
Logger logger = LoggerFactory.getLogger(this.getClass());
} }
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Copyright(c) 2018 BianPeng Co. Ltd. * Copyright(c) 2018 BianPeng Co. Ltd.
* All right reserved. * All right reserved.
*/ */
package com.buybit.test; package com.flying.cattle.mdg;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.Date; import java.util.Date;
......
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