Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.36 KB

File metadata and controls

30 lines (24 loc) · 1.36 KB

Description:

Introduction of new domain with auto projection output fine tuned through customization

Goals:

  • Demonstrate customization of auto projection with the ExplicitProjectionFieldConfiguration annotation

  • Demonstrate removing a field from the projection

  • Demonstrate limiting a field to response only during update/replace

  • Demonstrate altering deserialization/serialization (e.g. to/from MonetaryAmount for a BigDecimal field)

  • Builds On : 01600-newDomainComplexField

Key Steps:

  • Create spring boot autoconfiguration class NewDomainFineTuneAutoProjection, which will be referenced from META-INF/spring.factories

  • Setup domain (see 1600-newDomainComplexField)

  • Declare @ExplicitProjectionFieldConfiguration annotation on one or more fields in ChargingStation to fine tune how the projection is generated

  • Declare @EnableJpaTrackableFlow on the autoconfiguration class to setup the lifecycle plumbing for the new domain class

  • Declare @AutoConfigureBefore on the autoconfiguration class to scan the new domain class before JPA processing