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 TypeMethodDescriptionvoidRe-registers all metadata components.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) Methods inherited from class com.broadleafcommerce.metadata.dsl.registry.AbstractComponentRegistry
addComponent, getComponent, getComponents, getValidatorManager, hasComponent, initialize, isComponentIdCaseInsensitive, isFailOnValidationError, normalizeId, removeComponent, self, setComponentIdCaseInsensitive, setFailOnValidationError, validateRegistryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.metadata.dsl.registry.ComponentRegistry
add, add, get, get, getComponent, has, remove
-
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:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
reRegisterComponents
public void reRegisterComponents()Description copied from interface:ComponentRegistryRe-registers all metadata components. Useful during development, as this avoids needing to restart the application.- Specified by:
reRegisterComponentsin interfaceComponentRegistry<DefaultComponentRegistry>
-