forked from enilu/database-doc-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 70e13e0
Showing
13 changed files
with
528 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# database-doc-generator | ||
数据库文档生成器 | ||
|
||
- 该工具根据给定的链接生成数据库文档,如果你嫌powerdesigner太重,那么可以试试该工具。 | ||
- 你可以克隆该项目后运行mvn package打包,然后运行发布报中bin/start.bat | ||
- 运行程序后按照下面提示输入对应数据库参数: | ||
|
||
```bash | ||
input mysql host: | ||
127.0.0.1 | ||
input mysql port: | ||
3306 | ||
input database name: | ||
guns-lite | ||
input mysql username: | ||
root | ||
input mysql password: | ||
root | ||
``` | ||
- 输入完成后回车,即可生成数据库文档目录${dbname}-doc,目录中文档以markdown文件为载体: | ||
|
||
![doc](doc.jpg) | ||
|
||
- 确保安装了gitbook后,进入上述文件目录的命令行窗口运行:gitbook serve | ||
```bash | ||
E:\\database-doc-generator-20181006100721\guns-lite-doc>gitbook serve | ||
openssl config failed: error:02001003:system library:fopen:No such process | ||
Live reload server started on port: 35729 | ||
Press CTRL+C to quit ... | ||
|
||
info: 7 plugins are installed | ||
info: loading plugin "livereload"... OK | ||
info: loading plugin "highlight"... OK | ||
info: loading plugin "search"... OK | ||
info: loading plugin "lunr"... OK | ||
info: loading plugin "sharing"... OK | ||
info: loading plugin "fontsettings"... OK | ||
info: loading plugin "theme-default"... OK | ||
info: found 15 pages | ||
info: found 0 asset files | ||
info: >> generation finished with success in 1.6s ! | ||
|
||
Starting server ... | ||
Serving book on http://localhost:4000 | ||
``` | ||
- 访问http://localhost:4000,即可在线查看数据库文档 | ||
|
||
![summary](summary.jpg) | ||
|
||
![table](table.jpg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
title "database-doc-generator" | ||
cd .. | ||
set JAVA_OPTIONS=-Djava.ext.dirs="lib" | ||
set JAVA_OPTIONS2= -Dfile.encoding="UTF-8" | ||
|
||
java -classpath "%CLASSPATH%" %JAVA_OPTIONS% %JAVA_OPTIONS2% cn.enilu.tool.database.doc.generator.Main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_PATH=`readlink -f "$0"`; | ||
cd `dirname ${SCRIPT_PATH}` | ||
cd .. | ||
|
||
CP="" | ||
if [ -d target/classes ]; then | ||
CP=$CP:target/classes | ||
fi | ||
|
||
for jar in `/bin/ls -1 lib/*.jar` | ||
do | ||
CP=$CP:$jar | ||
done | ||
|
||
java -Xms256M -Xmx512M -cp $CP com.xinshucredit.icbc.Main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> | ||
<id>dist</id> | ||
<formats> | ||
<format>tar.gz</format> | ||
</formats> | ||
<fileSets> | ||
<fileSet> | ||
<directory>${project.basedir}</directory> | ||
<outputDirectory>/</outputDirectory> | ||
<includes> | ||
<include>lib/**/*</include> | ||
<include>bin/**/*</include> | ||
<include>README*</include> | ||
|
||
</includes> | ||
</fileSet> | ||
|
||
|
||
<fileSet> | ||
<directory>${project.basedir}/target</directory> | ||
<outputDirectory>/lib</outputDirectory> | ||
<includes> | ||
<include>database-doc-generator*.jar</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
</assembly> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>cn.enilu</groupId> | ||
<artifactId>database-doc-generator</artifactId> | ||
<version>1.0</version> | ||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format> | ||
<java_source_version>1.8</java_source_version> | ||
<java_target_version>1.8</java_target_version> | ||
<file_encoding>UTF-8</file_encoding> | ||
<skipTests>true</skipTests> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.nutz</groupId> | ||
<artifactId>nutz</artifactId> | ||
<version>1.r.66</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>mysql</groupId> | ||
<artifactId>mysql-connector-java</artifactId> | ||
<version>5.1.47</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.0</version> | ||
<configuration> | ||
<encoding>${project.build.sourceEncoding}</encoding> | ||
<source>${java_source_version}</source> | ||
<target>${java_target_version}</target> | ||
<compilerArgument>-Xlint:unchecked</compilerArgument> | ||
|
||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<skip>${skipTests}</skip> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>2.3</version> | ||
<configuration> | ||
<warSourceDirectory>webapp</warSourceDirectory> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>2.6</version> | ||
<configuration> | ||
<encoding>${project.build.sourceEncoding}</encoding> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>truezip-maven-plugin</artifactId> | ||
<version>1.1</version> | ||
<executions> | ||
<execution> | ||
<id>remove-a-file-in-sub-archive</id> | ||
<goals> | ||
<goal>remove</goal> | ||
</goals> | ||
<phase>package</phase> | ||
<configuration> | ||
<fileset> | ||
<directory>${project.basedir}/lib</directory> | ||
<includes> | ||
<include>*.jar</include> | ||
|
||
</includes> | ||
</fileset> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<version>2.8</version> | ||
<executions> | ||
<execution> | ||
<id>copy-dependencies</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>copy-dependencies</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.basedir}/lib</outputDirectory> | ||
<overWriteReleases>false</overWriteReleases> | ||
<overWriteSnapshots>true</overWriteSnapshots> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>2.4</version> | ||
<configuration> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<finalName>${project.artifactId}-${build.timestamp}</finalName> | ||
<descriptors> | ||
<descriptor>dist.xml</descriptor> | ||
</descriptors> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>make-assembly</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>assembly</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>2.6</version> | ||
<configuration> | ||
|
||
<excludes> | ||
<exclude>**/*.properties</exclude> | ||
</excludes> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
</project> |
Oops, something went wrong.