Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant