Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 1.42 KB

File metadata and controls

32 lines (26 loc) · 1.42 KB

Description:

Introduction of new domain including complex field structures

Goals:

  • Demonstrate domain introduction with embedded json collection fields

  • Demonstrate domain introduction with nested JPA OneToMany collection fields

  • Builds On : 01500-newDomain

Key Steps:

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

  • Create new JPA repository domain class (ChargingStation)

  • Create a new JPA repository domain class to serve as new collection field member (Charger)

  • Add @ProjectionPostConvert annotated method to Charger to handle the bi-directional reference back to the parent entity

  • Create a new simple POJO class to serve as JSON converted collection field member (Pricing)

  • Add new collection fields to ChargingStation

  • Add JPA converter on the Pricing related collection field in ChargingStation

  • 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