MJGA is a modern Java web scaffold built based on the following principles:
- Manages the entire lifecycle of an application and its environment through docker-compose.yml.
- Customizes all property variables through the .env file.
- Foundational business functions such as authentication, permission management, and cache abstraction.
- Code Check&Format, CI/CD Plugin, and Docker Integration, all ready to use out of the box.
- Comprehensive unit testing that is well-designed and isolates the runtime environment.
- Modern: technology choices closely follow the trends in the open-source community.
- Configurable: supports component selection and configuration on a web page.
- Meticulous coding: considers best practices for every variable, function, module, and component.
- Not-all-in-one: both now and in the future, MJGA will maintain its boundaries.
Technology | Version | Description |
---|---|---|
OpenJdk | 17 | |
SpringBoot | 3.2.1 | Core framework |
Jooq | 3.18.6 | Generates type-safe SQL queries |
Gradle | 8.4 | Automation build tool |
Pmd | 6.55.0 | Static code analysis tool |
Spotless | 6.18.0 | Code formatting |
... | ... | ... |
Confirm default environment variables
# env will be applied to compose.yaml
less ${projectRoot}/.env
Install Docker Engine and start the container
cd ${projectRoot}
docker-compose up -d
(Optional) Start on local machine
# confirm .env and make sure process can use it
nano/vim ${projectRoot}/.env
${projectRoot}/gradlew bootRun
# confirm .env and make sure process can use it
nano/vim ${projectRoot}/.env
# generate schema mapping codes
./gradlew generateJooq
# output ->
# projectRootDir/build/generated-src
# βββ jooq
# βββ tables # table mapping
# βββ daos # Data Access Layer
# βββ pojos # mapping dto
# βββ records # jooq query record