Commit aeb3e06e by yubaogu

tett

parent 0eabf0f1
#数据库配置
jdbc.url=jdbc:mysql://192.168.9.246:3306/bitbuy-dev?useSSL=false&serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8
jdbc.user=bitbuy-dev
jdbc.pass=bitbuy-dev
jdbc.database=bitbuy-dev
#包路径
url.entity=com.buybit.power.entity
url.dao=com.buybit.power.mapper
url.xmlmapper=com.buybit.power.mapper.xml
url.service=com.buybit.power.service
url.service.impl=com.buybit.power.service.impl
url.controller=com.buybit.power.web
#Swagger
swagger.enable=true
......@@ -29,7 +29,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2
public class SwaggerConfig {
@Value("${swagger.enable}")
@Value("\\\$\\\{swagger.enable\\\}")
private Boolean swagger_enable;
public static String CONTROLLER_URL="${controllerUrl}"; //Swagger扫描的接口路径
......
......@@ -7,12 +7,16 @@
package com.flying.cattle.mdg;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.gitee.flying.cattle.mdg.entity.BasisInfo;
import com.gitee.flying.cattle.mdg.util.EntityInfoUtil;
import com.gitee.flying.cattle.mdg.util.Generator;
import com.gitee.flying.cattle.mdg.util.MySqlToJavaUtil;
import javax.swing.text.DateFormatter;
/**
* Copyright: Copyright (c) 2019
*
......@@ -25,15 +29,14 @@ public class MyGenerator {
public static final String AUTHOR = "BianPeng";
public static final String VERSION = "V1.0";
// 数据库连接信息:连接URL、用户名、秘密、数据库名
public static final String URL = "jdbc:mysql://192.168.9.246:3306/bitbuy-dev?useSSL=false&serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8";
public static final String NAME = "bitbuy-dev";
public static final String PASS = "bitbuy-Dev1";
public static final String DATABASE = "bitbuy-dev";
public static final String URL = "jdbc:mysql://localhost:3306/seata?useSSL=false&serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8";
public static final String NAME = "root";
public static final String PASS = "12345678";
public static final String DATABASE = "seata";
// 类信息:类名、对象名(一般是【类名】的首字母小些)、类说明、时间
public static final String CLASSNAME = "foreign";
public static final String TABLE = "pm_foreign";
public static final String CLASSCOMMENT = "API应用KEY";
public static final String TIME = "2019年10月16日";
public static final String TABLE = "undo_log";
public static final String CLASSCOMMENT = "日志";
public static final String TIME = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
public static final String AGILE = new Date().getTime() + "";
// 路径信息,分开路径方便聚合工程项目,微服务项目
public static final String ENTITY_URL = "com.buybit.power.entity";
......@@ -54,7 +57,7 @@ public class MyGenerator {
bi.setEntityComment(CLASSCOMMENT);
try {
bi = EntityInfoUtil.getInfo(bi);
String fileUrl = "E:\\";// 生成文件存放位置
String fileUrl = "D:\\ydlwork\\generator\\";// 生成文件存放位置
//开始生成文件
String aa1 = Generator.createEntity(fileUrl, bi).toString();
String aa2 = Generator.createDao(fileUrl, bi).toString();
......
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