Simple extension of JpaProduct
adding only a basic field type. Also leverages auto projection, rather than opting for an explicit extended projection.
-
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
-
Create spring boot autoconfiguration class
ProductExtensionOnly
, which will be referenced from META-INF/spring.factories -
Create
MyAutoCoProduct
repository domain class extending Broadleaf’sJpaProduct
-
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