Specification binding API for Spring Data JPA, Jakarta EE 9.
Specification Mapper is a tool that facilitates the construction of Specifications. It reads the fields of a POJO and, through simple and memorable annotations, converts the values of these fields into Specifications. Specification Mapper also provides many extension points, allowing you to easily expand and implement your own logic.
It is influenced by tkaczmarzyk/specification-arg-resolver. We used specification-arg-resolver extensively for a period of time. However, in specification-arg-resolver, we had to expose the entity directly to the API. This became a conflict when we started implementing the Clean Architecture and became more concerned about layer dependencies. This conflict led to the development of Specification Mapper.
In the Clean Architecture, Specification Mapper provides a convenient way to convert and use any POJO in any layer. For example, in the infrastructure layer, Specification mapper can be used to convert domain objects into specifications. By using Specification Mapper, we can effectively manage dependencies between layers and achieve a clear and structured code architecture, enhancing code readability and maintainability.
The current version is implemented using Jakarta. If you are using Javax, please refer to this link.
Read the full documentation.
The versions listed below have been tested for compatibility.
- 17
- 21
The following shows versions with compatible Spring Boot releases.
- 3.0.x
- 3.1.x
- 3.2.x