List of usage examples for org.springframework.beans.factory.config CustomEditorConfigurer setPropertyEditorRegistrars
public void setPropertyEditorRegistrars(PropertyEditorRegistrar[] propertyEditorRegistrars)
From source file:org.echocat.jomon.spring.BaseConfiguration.java
@Bean(name = "customEditorConfigurer") public static CustomEditorConfigurer customEditorConfigurer() throws Exception { final CustomEditorConfigurer result = new CustomEditorConfigurer(); result.setPropertyEditorRegistrars(new PropertyEditorRegistrar[] { new BasePropertyEditorRegistrar() }); return result; }
From source file:org.web4thejob.context.ContextUtil.java
public static SessionContext getSessionContext() { SessionContext sessionContext = rootContext.getBean(SessionContext.class); if (!sessionContext.isActive()) { //SettingEnum PropertyEditor registration CustomEditorConfigurer customEditorConfigurer = new CustomEditorConfigurer(); customEditorConfigurer .setPropertyEditorRegistrars(new PropertyEditorRegistrar[] { new CustomEditorRegistrar() }); sessionContext.addBeanFactoryPostProcessor(customEditorConfigurer); sessionContext.refresh();//from w ww. ja va2 s.co m BeanPostProcessor beanPostProcessor = ContextUtil.getBean(AuthorizationBeanPostProcessor.class); if (beanPostProcessor != null) { sessionContext.getBeanFactory().addBeanPostProcessor(beanPostProcessor); } } return sessionContext; }