elasticsearch-grails-plugin icon indicating copy to clipboard operation
elasticsearch-grails-plugin copied to clipboard

Overrides Custom PropertyEditorRegistry Entry

Open bwagner5 opened this issue 9 years ago • 0 comments

Upon installation of the ElasticSearch Plugin Version 0.0.4.4, I found that my custom property editor was overridden.

Here's a simple property editor to show:

 import org.springframework.beans.PropertyEditorRegistrar
 import org.springframework.beans.PropertyEditorRegistry
 import org.springframework.beans.propertyeditors.CustomDateEditor
 import java.text.SimpleDateFormat
public class CustomPropertyEditorRegistrar implements PropertyEditorRegistrar {
    public void registerCustomEditors(PropertyEditorRegistry registry) {
        registry.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("MM/dd/yyyy HH:mm"), true));
    }
} 

Here's my resources.groovy:

  import org.springframework.security.web.authentication.session.ConcurrentSessionControlStrategy
  import org.springframework.security.web.session.ConcurrentSessionFilter
  import org.springframework.security.core.session.SessionRegistryImpl

  beans = {
      customPropertyEditorRegistrar(util.CustomPropertyEditorRegistrar)
      userDetailsService(MyUserDetailsService)
          {grailsApplication = ref('grailsApplication')}
      saltSource(util.UserSaltSource)
          {userPropertyToUse = application.config.grails.plugin.springsecurity.dao.reflectionSaltSourceProperty}

sessionRegistry(SessionRegistryImpl)

sessionAuthenticationStrategy(ConcurrentSessionControlStrategy, sessionRegistry) {
    maximumSessions = -1
}

concurrentSessionFilter(ConcurrentSessionFilter){
    sessionRegistry = sessionRegistry
    expiredUrl = '/login/concurrentSession'
  }
} 

bwagner5 avatar Jun 12 '15 15:06 bwagner5