Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Overrides Custom PropertyEditorRegistry Entry #115

Open
bwagner5 opened this issue Jun 12, 2015 · 0 comments
Open

Overrides Custom PropertyEditorRegistry Entry #115

bwagner5 opened this issue Jun 12, 2015 · 0 comments

Comments

@bwagner5
Copy link

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'
  }
} 
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant