Grails DataBindingListener not hearing binding events

Viewed 57

I added a class in src/groovy that implements the DataBindingListener interface. My init/Application file registers the Spring bean in the doWithSpring method

@Override
Closure doWithSpring() {

    def beans = {

        applicationBindingListener(org.mkv.ApplicationBindingListener)
    }
    return beans
}

I confirmed the bean is registered. However it doesn't seem to be receiving any of the binding events.

I'm using grails 4.0.0

1 Answers

In my case, I edit config/spring/resources.groovy. It's the source.

beans = {
  dataBindingListener org.mkv.ApplicationBindingListener
}

And, The code below is added as a test case method to ensure that the bean configured in the test code is used.

  boolean loadExternalBeans() {
    true
  }
Related