- Notifications
You must be signed in to change notification settings - Fork1
madz0/spring-binder
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
With spring-binder you'd get rid of writing the boilerplate codesto map postedDTO
objects toJPA
entity models and save them to database inSpring Framework
.It supports both x-www-form-urlencoded/multipart forms and REST requests.
Have you ever used or heard libraries likeModelMapper?There are samples to mapDTO
objects to entities usingModelMapper
.
Well, we do that in a more efficient and clever way. UsingModelMapper
you need to firstdesrialize data toDTO
object then useModelMapper
to access properties and create mapping.
This is somehow inefficient because the reflection is applied two times.
WithSpringBinder
, wile the object is getting deserilized, the mapping is applied.
Besides that, there are some other cool features like usingentity graph
and serilize/deserilizecustomization