Helper classes for JAX-RS - model mapping, exception handling, DTOs.
Maven dependency
<dependency>
<groupId>org.tkit.quarkus.lib</groupId>
<artifactId>tkit-quarkus-rest</artifactId>
</dependency>
All DTO
classes are in the package org.tkit.quarkus.rs.models
. These classes have weak reference to the
Entity
classes and PageResult
class in the tkit-quarkus-jpa-models extension.
The class RestExceptionDTO is for the
RestException.
This extension define the RestException
which should be use in the RestController
. This exception support
translation for the errorCode
with parameters
. The local is taken from the HTTP request. For default value use
Quarkus configuration value quarkus.default-locale
. Exception is in the package org.tkit.quarkus.rs.exceptions
In the package org.tkit.quarkus.rs.mappers
is the ExceptionMapper
for all Exception
in the project with priority DefaultExceptionMapper.PRIORITY
.
You can extend
and overwrite this ExceptionMapper
. Use the @Priority
to overwrite existing registration.