org.springframework.data.repository.support
Class DomainClassPropertyEditorRegistrar
java.lang.Object
org.springframework.data.repository.support.DomainClassPropertyEditorRegistrar
- All Implemented Interfaces:
- Aware, PropertyEditorRegistrar, ApplicationContextAware
public class DomainClassPropertyEditorRegistrar
- extends Object
- implements PropertyEditorRegistrar, ApplicationContextAware
Simple helper class to use Hades DAOs to provide PropertyEditor
s for domain classes. To get this
working configure a ConfigurableWebBindingInitializer
for your
AnnotationMethodHandlerAdapter
and register the
DomainClassPropertyEditorRegistrar
there:
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="webBindingInitializer">
<bean class="org.springframework.web.bind.support.ConfigurableWebBindingInitializer">
<property name="propertyEditorRegistrars">
<bean class="org.springframework.data.extensions.beans.DomainClassPropertyEditorRegistrar" />
</property>
</bean>
</property>
</bean>
Make sure this bean declaration is in the ApplicationContext
created by the DispatcherServlet
whereas the repositories need to be declared in the root
WebApplicationContext
.
- Author:
- Oliver Gierke
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DomainClassPropertyEditorRegistrar
public DomainClassPropertyEditorRegistrar()
registerCustomEditors
public void registerCustomEditors(PropertyEditorRegistry registry)
- Specified by:
registerCustomEditors
in interface PropertyEditorRegistrar
setApplicationContext
public void setApplicationContext(ApplicationContext context)
- Specified by:
setApplicationContext
in interface ApplicationContextAware
Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.