# 1) Start Postgres quickly
docker-compose up -d
# 2) Run the app
./mvnw spring-boot:run # if you add Maven wrapper
# or
mvn spring-boot:run- Web (form login): http://localhost:8080 (admin/admin123)
- Admin CRUD: http://localhost:8080/admin/users
- Swagger UI: http://localhost:8080/swagger-ui/index.html
You can override DB and JWT via env vars:
DB_URL=jdbc:postgresql://localhost:5432/demo
DB_USER=demo
DB_PASS=demo
JWT_SECRET=your-long-random-secret
- Login to get JWT:
POST /api/auth/login
{
"username": "admin",
"password": "admin123"
}
- Get current user:
GET /api/me
Authorization: Bearer <token>