Reorganized Java lab workspace with multiple learning sites and GitHub Pages friendly entrypoints.
Live site: Java Labs
Java Labs is a Java backend learning repository and a static GitHub Pages learning portal at the same time.
The learning portal currently includes:
Interview Practice Site: topic-based study with questions, answers, explanations, code examples, and self-practice prompts.Interview Levels Site: interview question hub grouped byBasic / Intermediate / Advanced.Quiz Site: randomized quiz sets to evaluate your level acrossFresher / Interview / Senior.Roadmap Site: Java backend learning roadmap, technology map, integration flow, and knowledge tree.
java-labs/
├── index.html # Redirects to the portal inside docs
├── docs/ # Static learning portal for GitHub Pages
│ └── assets/
│ ├── css/ # Shared styles for the static sites
│ └── js/ # Shared JavaScript for rendering JSON content
├── scripts/ # Helper scripts for running modules and checks
├── basic/ # Java core practice
├── spring/ # Spring Boot practice project
└── notification-service/ # Event consumer service
There are two practical ways to host the portal:
- Host from the repository root
- Root
index.htmlredirects todocs/index.html
- Host from the
docsfolder
- Open
Settings -> Pages - Choose
Deploy from a branch - Select your main branch and the
/docsfolder
If your repository is java-labs under the thanhson99 account, the live URL will look like:
https://thanhson99.github.io/java-labs/
The portal inside docs/ uses:
HTMLCSSJavaScriptJSON
There is no database. Content is loaded from JSON files so the portal can keep growing with:
- theory questions
- interview questions
- code questions and trick questions
- static quizzes
- roadmap and technology guides
cd basic
./mvnw -q -DskipTests compile
java -cp target/classes com.example.javalabs.basic.LearningAppRun tests:
./mvnw testOr from the repository root:
./scripts/run.sh basiccd spring
./mvnw spring-boot:runOr from the repository root:
./scripts/run.sh springExample:
./scripts/run.sh spring
JAVA_VERSION=17 PORT=8095 ./scripts/run.sh springThe Spring module currently includes:
- REST API
- request validation
- H2 + JPA + Flyway
- analytics JDBC datasource
- transaction rollback demo
- JWT authentication
- refresh token rotation
- logout / logout-all
- Kafka + RabbitMQ publishers/consumers
- outbox pattern
- retry + dead-letter handling
- Actuator health + metrics
- Postgres profile with Docker Compose
- Testcontainers integration tests
Useful endpoints:
GET /hello?name=Spring
POST /api/auth/token
POST /api/auth/refresh
POST /api/auth/logout
POST /api/auth/logout-all
POST /api/users/register
POST /api/users/register-demo?failAfterAudit=true
GET /api/users/{userId}
GET /api/system/dashboard
GET /api/system/overview
GET /actuator/health
GET /actuator/info
GET /h2-console
Protected /api/** endpoints require:
Authorization: Bearer <jwt>
Demo credentials:
student / student123 -> USER
admin / admin123 -> ADMIN, USER