parent
6e00bea616
commit
f4412a02da
@ -0,0 +1,22 @@
|
||||
{
|
||||
"hints": [],
|
||||
"groups": [
|
||||
{
|
||||
"sourceType": "com.charge.gwmgr.filter.ZuulPreFilter",
|
||||
"name": "jwt.filter",
|
||||
"type": "com.charge.gwmgr.filter.ZuulPreFilter"
|
||||
}
|
||||
],
|
||||
"properties": [
|
||||
{
|
||||
"sourceType": "com.charge.gwmgr.filter.ZuulPreFilter",
|
||||
"name": "jwt.filter.no-access-filter",
|
||||
"type": "java.util.List<java.lang.String>"
|
||||
},
|
||||
{
|
||||
"sourceType": "com.charge.gwmgr.filter.ZuulPreFilter",
|
||||
"name": "jwt.filter.should-not-filter",
|
||||
"type": "java.util.List<java.lang.String>"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.icharge.framework</groupId>
|
||||
<artifactId>rough</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<artifactId>ds_tools</artifactId>
|
||||
<name>Archetype - ds_tools</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zaxxer</groupId>
|
||||
<artifactId>HikariCP</artifactId>
|
||||
<version>4.0.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 数据库设计文档生成工具-->
|
||||
<dependency>
|
||||
<groupId>cn.smallbun.screw</groupId>
|
||||
<artifactId>screw-core</artifactId>
|
||||
<version>1.0.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
<version>2.3.30</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -1,81 +0,0 @@
|
||||
import cn.smallbun.screw.core.Configuration;
|
||||
import cn.smallbun.screw.core.engine.EngineConfig;
|
||||
import cn.smallbun.screw.core.engine.EngineFileType;
|
||||
import cn.smallbun.screw.core.engine.EngineTemplateType;
|
||||
import cn.smallbun.screw.core.execute.DocumentationExecute;
|
||||
import cn.smallbun.screw.core.process.ProcessConfig;
|
||||
import com.zaxxer.hikari.HikariConfig;
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GenerateMysqlDoc {
|
||||
public static void main(String[] args) {
|
||||
String fileOutputDir = "c:\\";
|
||||
//数据源
|
||||
HikariConfig hikariConfig = new HikariConfig();
|
||||
hikariConfig.setDriverClassName("com.mysql.jdbc.Driver");
|
||||
hikariConfig.setJdbcUrl("jdbc:mysql://10.10.14.210:22066/yltcharge?useUnicode=true&characterEncoding=UTF-8&useSSL=false");
|
||||
hikariConfig.setUsername("root");
|
||||
hikariConfig.setPassword("DsideaL147258369");
|
||||
//设置可以获取tables remarks信息
|
||||
hikariConfig.addDataSourceProperty("useInformationSchema", "true");
|
||||
hikariConfig.setMinimumIdle(2);
|
||||
hikariConfig.setMaximumPoolSize(5);
|
||||
DataSource dataSource = new HikariDataSource(hikariConfig);
|
||||
//生成配置
|
||||
EngineConfig engineConfig = EngineConfig.builder()
|
||||
//生成文件路径
|
||||
.fileOutputDir(fileOutputDir)
|
||||
//打开目录
|
||||
.openOutputDir(true)
|
||||
//文件类型
|
||||
.fileType(EngineFileType.HTML)
|
||||
//生成模板实现
|
||||
.produceType(EngineTemplateType.freemarker)
|
||||
//自定义文件名称
|
||||
.fileName("驿来特数据库文档").build();
|
||||
|
||||
//忽略表
|
||||
ArrayList<String> ignoreTableName = new ArrayList<>();
|
||||
//ignoreTableName.add("test_user");
|
||||
//ignoreTableName.add("test_group");
|
||||
//忽略表前缀
|
||||
ArrayList<String> ignorePrefix = new ArrayList<>();
|
||||
//ignorePrefix.add("test_");
|
||||
//忽略表后缀
|
||||
ArrayList<String> ignoreSuffix = new ArrayList<>();
|
||||
//ignoreSuffix.add("_test");
|
||||
|
||||
ProcessConfig processConfig = ProcessConfig.builder()
|
||||
//指定生成逻辑、当存在指定表、指定表前缀、指定表后缀时,将生成指定表,其余表不生成、并跳过忽略表配置
|
||||
//根据名称指定表生成
|
||||
//.designatedTableName(new ArrayList<>())
|
||||
//根据表前缀生成
|
||||
.designatedTablePrefix(new ArrayList<>())
|
||||
//根据表后缀生成
|
||||
.designatedTableSuffix(new ArrayList<>())
|
||||
//忽略表名
|
||||
.ignoreTableName(ignoreTableName)
|
||||
//忽略表前缀
|
||||
.ignoreTablePrefix(ignorePrefix)
|
||||
//忽略表后缀
|
||||
.ignoreTableSuffix(ignoreSuffix).build();
|
||||
//配置
|
||||
Configuration config = Configuration.builder()
|
||||
//版本
|
||||
.version("1.0.0")
|
||||
//描述
|
||||
.description("驿来特数据库设计文档生成")
|
||||
//数据源
|
||||
.dataSource(dataSource)
|
||||
//生成配置
|
||||
.engineConfig(engineConfig)
|
||||
//生成配置
|
||||
.produceConfig(processConfig)
|
||||
.build();
|
||||
//执行生成
|
||||
new DocumentationExecute(config).execute();
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
<archetype>
|
||||
<id>ds_tools</id>
|
||||
<sources>
|
||||
<source>src/main/java/App.java</source>
|
||||
</sources>
|
||||
<testSources>
|
||||
<source>src/test/java/AppTest.java</source>
|
||||
</testSources>
|
||||
</archetype>
|
@ -1,15 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>$com.icharge.framework</groupId>
|
||||
<artifactId>$ds_tools</artifactId>
|
||||
<version>$1.0.0</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -1,13 +0,0 @@
|
||||
package $com.icharge.framework;
|
||||
|
||||
/**
|
||||
* Hello world!
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
System.out.println( "Hello World!" );
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
package $com.icharge.framework;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
Loading…
Reference in new issue