Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.21 KB

File metadata and controls

30 lines (24 loc) · 1.21 KB

Description:

Simple extension of JpaProduct adding only a basic field type. Also leverages auto projection, rather than opting for an explicit extended projection.

Goals:

  • Demonstrate the simplest type of extension

  • Introduce the Projection interface

  • Show full lifecycle support (json in/out) for the endpoint API

  • Show supporting admin customization

  • Show automated testing and the use of @TestCatalogRouted (et al.) to handle datarouting requirements during the test

Key Steps:

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

  • Create MyAutoCoProduct repository domain class extending Broadleaf’s JpaProduct

  • Implement new field in MyAutoCoProduct

  • Add JpaEntityScan annotation to autoconfiguration class above for new extended entity class

  • Add AutoConfigureBefore(..) annotation to autoconfiguration class above to make sure the entity reference is scanned before JPA processing