java.lang.IllegalStateException:未设置ServletContext

时间:2018-08-08 12:32:59

标签: grails

在运行grails 3.3.6应用程序时出现此错误。不知道我明白这个错误的意思。

原因:java.lang.IllegalStateException:未设置ServletContext         在org.springframework.util.Assert.state(Assert.java:70)         在org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.resourceHandlerMapping(WebMvcConfigurationSupport.java:448)处         在org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration $$ EnhancerBySpringCGLIB $$ a9f8fad3.CGLIB $ resourceHandlerMapping $ 34()         在org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration $$ EnhancerBySpringCGLIB $$ a9f8fad3 $$ FastClassBySpringCGLIB $$ 7b54997c.invoke()         在org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)         在org.springframework.context.annotation.ConfigurationClassEnhancer $ BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)处         在org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration $$ EnhancerBySpringCGLIB $$ a9f8fad3.resourceHandlerMapping()         在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处         在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)         在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)         在java.lang.reflect.Method.invoke(Method.java:498)         在org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1427)         在org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)         ...省略了24个共同的框架


对于导致此错误的任何线索,我们将不胜感激。

谢谢 设拉子

0 个答案:

没有答案