AN
anboo44/activej-real-world-example
Example ActiveJ: Java framework for modern web, cloud, high-load, and microservices solutions
ActiveJ Real World Project
This project is for learning ActiveJ Framework, run on JDK 17
Information
ActiveJ is the best performance framework in Java on February 27, 2023.
Libraries
This project use:
- io.activej: ActiveJ Framework
- dsl-json-java8: JSON serialization with high performance
- logback-classic: For logging
- lombok: For useful annotations
- hibernate-hikaricp: Work with database
- mysql-connector-java: For Mysql 8.0
- liquibase-core: For migrating at runtime
View pom.xml for more details
Before run
Install JDK 17
Install MySQL v8
Setup database: Replace your config to file app.properties
Run
On the local, run main file: AppLauncher.java
On the dev/production, run commands:
-> Build: maven package -DskipTests=true
-> Run: java -Denv={dev/prod} -jar AppLauncher.jar
-> Build native: native-image -R:MaxHeapSize=2g --verbose --target windows -jar AppLauncher.jar
The application runs on port: 8080
GraalVM
https://www.graalvm.org/22.1/reference-manual/native-image/Resources/
-> 1. Build via native-image: native-image --verbose -jar AppLauncher.jar
This way is simple without config
-> Build via maven: maven -Pnative -DskipTests=true package
Complicate with more configs
API Reference
Homepage (public)
GET http://localhost:8080Health check (public)
GET http://localhost:8080/api/v1/health-checkLogin (public)
GET http://localhost:8080/api/v1/loginCreate a new session to access private router
Add user (public)
POST http://localhost:8080/api/v1/users| JSON Body | Type | Description |
|---|---|---|
name |
string |
Required |
age |
int |
Required |
List all users (private)
GET http://localhost:8080/api/v1/usersIf you don't login, you won't access this router
Get one user (private)
GET http://localhost:8080/api/v1/users/${userId}If you don't login, you won't access this router
Support
For support, contact email hungpt58.uet@gmail.com
On this page
Languages
Java58.1%HTML22.2%CSS12.5%JavaScript7.2%
Contributors
Created February 27, 2023
Updated October 30, 2025
