Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 1.02 KB

File metadata and controls

27 lines (20 loc) · 1.02 KB

Description:

Uses a simple customization of the DefaultProductService.

Goals:

  • Show a minor customization of the business logic of DefaultProductService

Key Steps:

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

  • Create extension (ExtendedProductService) of DefaultProductService overriding a method from the parent service

  • 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