Getting started

Getting started in 5 minutes

No containers required; a local JDK 21 and one MySQL instance are enough to boot, sign in and generate a module.

The goal is three things in five minutes: boot it, sign in to the console, generate a module. No container environment, no manual table creation.

1 · Prerequisites

java -version # 21 required
mysql --version # 8.0+ required
./gradlew --version # use the bundled wrapper, do not install Gradle
DependencyVersionNotes
JDK21locked by the toolchain in build.gradle; a wrong version fails outright
MySQL8.0+the only supported database; Liquibase creates the schema
Gradle9.5.0use the in-repo gradlew, never a local Gradle

Note: SMTP for email codes is optional. Without it the code is only written to the log and sign-in still completes.

2 · Get the code and configure it

git clone <repository-url> minimao
cd minimao
cp .env.example .env

Edit .env and fill in the variables below (real credentials stay on this machine and never enter the repository):

VariablePurposeExample
MINIMAO_DB_URLDatabase connection URLjdbc:mysql://127.0.0.1:3306/minimao?useUnicode=true&characterEncoding=utf8mb4
MINIMAO_DB_USERNAMEDatabase userminimao
MINIMAO_DB_PASSWORDDatabase passwordlocal only, never committed
MINIMAO_BOOTSTRAP_ADMIN_PASSWORD_HASHBCrypt hash of the initial admin passwordwritten only during first initialization
MAIL_HOST / MAIL_USERNAME / MAIL_PASSWORDCredentials for sending email codeswithout them, read the code from the log

Warning: the repository contains no intranet addresses and no real credentials. application.yml and .env.example are registered in both directions; missing either one fails the build.

3 · Start it

./gradlew bootRun
# Windows: gradlew.bat bootRun

On first start Liquibase runs every migration to create tables and writes seed data plus the initial administrator. You are up when you see Started MiniMaoApplication in Xs.

Warning: the initial admin password comes from MINIMAO_BOOTSTRAP_ADMIN_PASSWORD_HASH (a BCrypt hash). Do not use a weak hash and do not put the plaintext in a config file.

4 · Sign in to the console

open http://localhost:8080

After signing in as the initial administrator you can see users, roles, menus, dictionaries and operation logs, and you can sign in with accounts of different roles to watch the button-level differences.

5 · Generate a module

./gradlew generateModule -Pname=demo
./gradlew build

The skeleton generator emits directories, migration scripts and test skeletons, and registers the module, permission codes and menus. Generated code ships with tests and the build must pass on the first run — that is a hard criterion, not advice.

Next

Last updated 2026-10-09Edit this page →