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
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
DevelopmentComponentRegistry
-
-
Method Details
-
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>
-