Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 1.34 KB

File metadata and controls

29 lines (23 loc) · 1.34 KB

Description:

Adds a new repository implementation fragment overriding out-of-the-box behavior of JpaTrackableRepository

Goals:

  • Show concrete fragment contribution example overriding JpaTrackableRepository methods for JpaProductRepository

  • Demonstrate the use of JpaTrackableRepositoryDelegateSupplier to use in the fragment for extension via composition

  • Builds On : 00200-productExtensionComplexFieldJson

Key Steps:

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

  • Declare the JpaTrackableRepositoryDelegateHelper bean for access to the Broadleaf repository

  • Create a new concrete repository fragment (DefaultMyAutoCoProductRepositoryOverride) and an associated interface

  • Override (or add new) methods in the fragment

  • Declare a bean for the concrete fragment in the autoconfiguration class

  • Declare a RepositoryContribution bean in the autoconfiguration class, registering the new fragment with Broadleaf’s out-of-the-box repository