Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.28 KB

File metadata and controls

28 lines (22 loc) · 1.28 KB

Description:

Business logic customization that leverages a customized repository and extended domain with auto projection

Goals:

  • Show DefaultProductService call the customized repository to search by a new extended field

  • Demonstrate how to use the Projection interface to interact with the service API

  • Builds On : 00800-repositoryCustomizationContribution

Key Steps:

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

  • Create extension (MyAutoCoProductService) of DefaultProductService adding a new method

  • Use the @Component annotation on the extended service

  • Declare the @ComponentScan annotation on the autoconfiguration class (avoid the larger constructor injection requirements of declaring a bean for the service extension)

  • Declare @AutoConfigureBefore on the autoconfiguration class to prioritize the service extension over Broadleaf’s own declaration