Exception handling mechanism prompt for spring boot project
## Exception Mechanism — Prompt (Spring Boot Microservice) ### Goal Build a standardized, i18n-enabled exception mechanism in a Spring Boot microservice that returns error responses aligned with HTTP status codes. --- ### Package structure ``` exception/ ├── base/ │ ├── BaseErrorService.java (interface) │ ├── BaseErrorEnum.java (common/base error codes) │ ├── BaseException.java (abstract exception) │ ├── BaseErrorResponseDto.java (API response DTO) │ └── {Specific}Exception.java (optional — domain-specific, extends BaseException) ├── {ServiceName}ErrorEnum.java (project-specific error enum) ├── {ServiceName}Exception.java (general domain exception) ├── {Domain}Exception.java (domain exceptions — as needed) ├── ClientException.java (Feign/external error wrapper — SEPARATE from BaseException) └── GlobalExceptionHandler.java (@RestControllerAdvice) ``` --- ### 1. `BaseErrorService` (interface) The contract that al...