This project is for learning ActiveJ Framework, run on JDK 17
ActiveJ is the best performance framework in Java on February 27, 2023.
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
Install JDK 17
Install MySQL v8
Setup database: Replace your config to file app.properties
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
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
GET http://localhost:8080
GET http://localhost:8080/api/v1/health-check
GET http://localhost:8080/api/v1/login
Create a new session to access private router
POST http://localhost:8080/api/v1/users
JSON Body | Type | Description |
---|---|---|
name |
string |
Required |
age |
int |
Required |
GET http://localhost:8080/api/v1/users
If you don't login, you won't access this router
GET http://localhost:8080/api/v1/users/${userId}
If you don't login, you won't access this router
For support, contact email hungpt58.uet@gmail.com