🏆🎖️🥇🥈🥉🏅
MJGA is a modern Java Web scaffolding designed with cloud-native concepts in mind. It offers the following features:
- Containerized applications
- Modular components
- Highly regarded unit tests
- Manage the entire lifecycle and configuration of the application via
docker-compose.yml
. - Customize all configurations through the
.env
file. - Deliver the entire application and its ecosystem components via
docker-compose.yml
.
- Integrates common basic business functions such as authentication, permission management, and cache abstraction.
- Code Check&Format, CI/CD Plugin, Docker Integration are all ready to use out-of-the-box.
- Comprehensive, design-driven, and environment-isolated unit tests.
- Modern: Technology choices follow the trends of the open-source community.
- Configurable: Supports component selection on the web.
- Best Practices: Every variable, function, module, and component is designed with best practices in mind.
- Focus on Boundaries: Stays within its functional boundaries, not aiming to be a "Not All In One" solution.
More components are under development...
Confirm Environment Variables and Execution Permissions
# confirm .env and make sure process can use it
vim ${projectRoot}/.env
# confirm gradlew executable (unix-like OS)
chmod 755 ${projectRoot}/gradlew
Install Docker and Start Containers
cd ${projectRoot}
docker compose up -d database
docker compose build web
docker compose up -d web
(Optional) Start Locally
# confirm .env and gradle.properties make sure process can use it
vim ${projectRoot}/.env
vim ${projectRoot}/gradle.properties
docker compose up -d database
./gradlew jooqCodegen
${projectRoot}/gradlew bootRun
Compile the Project and Generate Table Mapping Objects and Data Access Layer Based on Database Schema
# confirm .env and make sure process can use it
vim ${projectRoot}/.env
# generate schema mapping codes
./gradlew jooqCodegen
# output ->
# projectRootDir/build/generated-sources
# └── org.jooq.generated
# └── tables # table mapping
# ├── daos # Data Access Layer
# ├── pojos # mapping dto
# └── records # jooq query record
Global Code Formatting
./gradlew spotlessApply
Global Code Inspection
# confirm .env and make sure process can use it
vim ${projectRoot}/.env
./gradlew pmdMain
Unit Testing
# confirm .env and make sure process can use it
vim ${projectRoot}/.env
# will automatically generate jacocoTestReport
./gradlew test
- This repository is primarily for code display and issue collection. The code may lag behind the version available for download from the product's official website.
- Please submit any feedback, discussions, or bugs to the issue tracker, and I will handle them seriously.
- I also welcome any ideas from other communities and will actively participate in the replies.
- More new video tutorials are being recorded, please stay tuned.
- Promote Mjga to your colleagues and friends, and let Java be great again.