code-gen is a code generation tool that can customize templates to generate different codes and supports MySQL, Oracle, SQL Server, and PostgreSQL.
It only requires a Java8 environment and can be run and used after downloading.
The steps are simple, just configure a data source and then check the template to generate code.
Common entity classes, mybatis interfaces, and mybatis configuration file templates are provided by default, which can quickly develop mybatis applications.
Technologies used: SpringBoot + Mybatis + Vue
Go to the distribution page and download this zip file
Unzip the zip. If it is a Mac/Linux operating system, run the startup.sh file to start. For Windows operating systems, run cmd and enter java -jar gen.jar to start.
Browser access http://localhost:6969/
The default port is 6969, change the port number as follows
Mac/Linux operating system: Open the startup.sh file and modify the --server.port parameter value
Windows operating system: Executable: java -jar gen.jar --server.port=port number
Method 1: Download the public image
docker pull tanghc2020/gen:latest
After downloading, execute docker run --name gen -p 6969:6969 -d
Browser access http://ip:6969/
Method 2: Build the image locally
clone the code and then execute the docker-build.sh script
Execute docker run --name gen -p 6969:6969 -d
front: front-end vue
gen: backend service
db: database initialization file
script: auxiliary script
Need to install Maven3, Java8
Mac/Linux systems can directly execute build.sh to build, and the build results are in the dist folder.
cd front
Execute npm run build:prod for packaging, and the result is under dist
Put all the files in dist under gen/src/main/resources/public
cd..
Execute mvn clean package, a gen-xx-SNAPSHOT.jar will be generated under gen/target (xx means this number)
Place gen-xx-SNAPSHOT.jar and gen.db under db in the same folder
Execute java -jar gen-xx-SNAPSHOT.jar
Browser access http://localhost:6969/