Class DevelopmentComponentRegistry
- java.lang.Object
-
- com.broadleafcommerce.metadata.dsl.registry.AbstractComponentRegistry<DefaultComponentRegistry>
-
- com.broadleafcommerce.metadata.dsl.registry.DefaultComponentRegistry
-
- com.broadleafcommerce.metadata.dsl.registry.DevelopmentComponentRegistry
-
- All Implemented Interfaces:
ComponentRegistry<DefaultComponentRegistry>
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class DevelopmentComponentRegistry extends DefaultComponentRegistry implements org.springframework.context.ApplicationContextAware
Component registry that can be used during development. Calling the re-register components method will rebuild metadata. This relies on JDK class hot swapping.To enable, add the property 'broadleaf.metadata.development-mode=true'
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.context.ApplicationContext
applicationContext
-
Constructor Summary
Constructors Constructor Description DevelopmentComponentRegistry(ComponentValidatorManager validatorManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
reRegisterComponents()
Re-registers all metadata components.void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
Methods inherited from class com.broadleafcommerce.metadata.dsl.registry.AbstractComponentRegistry
add, add, addComponent, get, get, getComponent, getComponent, getComponents, getValidatorManager, has, hasComponent, initialize, isFailOnValidationError, remove, removeComponent, self, setFailOnValidationError, validateRegistry
-
-
-
-
Constructor Detail
-
DevelopmentComponentRegistry
public DevelopmentComponentRegistry(ComponentValidatorManager validatorManager)
-
-
Method Detail
-
setApplicationContext
@Autowired public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-
reRegisterComponents
public void reRegisterComponents()
Description copied from interface:ComponentRegistry
Re-registers all metadata components. Useful during development, as this avoids needing to restart the application.- Specified by:
reRegisterComponents
in interfaceComponentRegistry<DefaultComponentRegistry>
-
-