0

When i am migrating my project from grails-2.4.4 to grails-3.2.0. Configration : Java 8 Grails 3.2.0 Gradle 3.1.

I am also migrating filters to interceptors.

Here is my interceptor :

class MemoryUsageInterceptor {
MemoryUsageInterceptor() {
    println(">>> MemoryUsageInterceptor constructor")
    matchAll()
}

boolean before() {
    println(">>> MemoryUsageInterceptor before")

    true
}

boolean after() { true }

void afterView() {
    // no-op
}
}

When my application is up then interceptor constructor is called. But its action is not called. Can you please tell me where i am wrong.

hedha
  • 266
  • 1
  • 2
  • 10
  • Have you tested in a new Grails 3.2.0 application? If you are able to replicate the issue please upload the sample app to github and share the link. – Puneet Behl Nov 03 '16 at 09:52

1 Answers1

2

I encountered what I believe is the same or a very similar issue. My interceptors were working when running in interactive development mode, but when I packaged them as a WAR and ran them the interceptor would not load at all.

It appears this issue was present in Grails 3.2.0 to 3.2.2.

I resolved this issue by upgrading to Grails 3.2.3.

James Xabregas
  • 726
  • 7
  • 22