Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class BootStrap {
- def dataLoaders;
- def init = { servletContext ->
- startLoaders();
- }
- def startLoaders() {
- for (IDataLoader loader : dataLoaders) {
- runAsync {
- loader.setup();
- loader.startLoading();
- }
- }
- }
- }
- ERROR org.codehaus.groovy.grails.web.context.GrailsContextLoader Error initializing the application: No signature of method: BootStrap.runAsync() is applicable for argument types: (BootStrap$_startLoaders_closure3) values: [BootStrap$_startLoaders_closure3@6892f97b]
- groovy.lang.MissingMethodException: No signature of method: BootStrap.runAsync() is applicable for argument types: (BootStrap$_startLoaders_closure3) values: [BootStrap$_startLoaders_closure3@6892f97b]
- at BootStrap.startLoaders(BootStrap.groovy:27)
- at BootStrap$_closure1.doCall(BootStrap.groovy:15)
- compile ":executor:0.3"
- class BootStrap {
- def dataLoaders
- def executorService
- def init = { servletContext ->
- startLoaders()
- }
- def startLoaders() {
- for (IDataLoader loader : dataLoaders) {
- executorService.submit({
- loader.setup()
- loader.startLoading()
- } as Callable)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement