Closed bassmartin closed 6 years ago
I got an issue in staging with this fix, I'll investigate tomorrow. Do not merge yet.
The issue was loosely related to ExpandoMetaclass being enabled globally. I had to replace one as
to a regular Java cast ()
in a @Singleton
class.
I just pushed another change to put this 'enable' in a static block instead of in the doWithSpring
block so it is executed sooner during application boot.
How about Graeme's comment that this shouldn't be used with Grails 3.x? With this revert we will not get the original issue back?
I'm enabling it in a static block, so before metaclass changes are done by Grails so I think it goes around the issue (previously we were enabling it late in the bootstrap, after some metaclass changes done by Grails, which was causing issue). Maybe Grails do not requires the global expando, but the plugins does to properly monitor beans. There might be another way to do it that I'm not aware of though.
to properly support subclassing of services and other stuff. This makes intercepting all service calls work as they were a while ago. The code is done in the doWithSpring phase to avoid removing metaclass changes done by Grails (see #43)
Fixes #63