Skip to content

Commit

Permalink
Grails Console: remove unnecessary configureApplicationContextClass()…
Browse files Browse the repository at this point in the history
… in DevelopmentGrails
  • Loading branch information
rainboyan committed May 22, 2023
1 parent e1f963e commit 768a36c
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
package grails.ui.support

import groovy.transform.CompileStatic
import org.springframework.boot.ApplicationContextFactory
import org.springframework.util.ClassUtils
import org.springframework.web.context.support.GenericWebApplicationContext

import grails.boot.Grails

Expand All @@ -31,16 +28,6 @@ class DevelopmentGrails extends Grails {

protected DevelopmentGrails(Class<?>... sources) {
super(sources)
configureApplicationContextClass()
}

protected configureApplicationContextClass() {
if (ClassUtils.isPresent('javax.servlet.ServletContext', Thread.currentThread().contextClassLoader)) {
setApplicationContextFactory(ApplicationContextFactory.ofContextClass(DevelopmentGrailsApplicationContext))
}
else {
setApplicationContextFactory(ApplicationContextFactory.ofContextClass(GenericWebApplicationContext))
}
}

}

0 comments on commit 768a36c

Please sign in to comment.