Skip to content

Task 10 feat: dockerize application, add Swagger docs and global exce…#11

Merged
dawiddykacz merged 1 commit into
mainfrom
add_docker_run
Apr 20, 2026
Merged

Task 10 feat: dockerize application, add Swagger docs and global exce…#11
dawiddykacz merged 1 commit into
mainfrom
add_docker_run

Conversation

@dawiddykacz
Copy link
Copy Markdown
Collaborator

Description

This PR introduces full containerization, interactive API documentation, and standardizes error handling across the application. It also resolves dependency conflicts and adds a comprehensive README for easier onboarding.

Key Changes

Dockerization: Added a multi-stage Dockerfile and docker-compose.yml for seamless local development without requiring local Java/Maven setups.
Swagger UI: Integrated springdoc-openapi (v2.6.0). Configured Spring Security to expose /swagger-ui/** and /v3/api-docs endpoints. Added descriptive annotations to AuthController and DTOs.
Global Exception Handling: Implemented @RestControllerAdvice. Created a custom UserAlreadyExistsException mapped to 409 Conflict (replacing the previous null-return logic).

  • Removed invalid webmvc starter references.
    Database Config: Changed spring.jpa.hibernate.ddl-auto to update to prevent dropping tables on container restarts
    Documentation: Added a detailed README.md with tech stack, setup instructions, and Swagger guidelines.

How to test

  1. Run docker-compose up --build -d
  2. Navigate to http://localhost:8082/swagger-ui.html
  3. Try registering a user.
  4. Try registering the same user again to verify the 409 Conflict response.

@dawiddykacz dawiddykacz self-assigned this Apr 20, 2026
@dawiddykacz dawiddykacz requested a review from GieniuG April 20, 2026 16:42
@dawiddykacz dawiddykacz merged commit 463d4c5 into main Apr 20, 2026
2 checks passed
@dawiddykacz dawiddykacz deleted the add_docker_run branch April 20, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants