Grails - Making Methods Globally Available and Metaclass Programming
问题 I inserted this line into my init() of my BootStrap class Integer.metaClass.minutes = { 60000L * delegate } I was then not able to use it from a Job class (Quartz plugin). Do I put this line of code somewhere else to make it a global modification? I was also wondering the best way to make a function available inside all classes in Grails. Like a global function. Would it be to extend the Object metaclass? or is there a better way? 回答1: Do I put this line of code somewhere else to make it a