焱龙侠 发表于 2022-8-31 11:30:56

jeeccgBaseConfig对象下的shiro对象是null,导致项目启动失败


情况描述:
    使用jeecg-boot 3.2.0版本进行开发,前几次项目启动的好好的,能正常启动,但是之后也不知道怎么了,就起不来了;然后项目删了,重新down项目,重新运行,才可以;下面是启动报错;初始化,加载jeeccgBaseConfig对象的时候,jeeccgBaseConfig对象下的shiro对象是null,导致项目启动失败,现在就是不知道怎么解决,老是这样子,我已经重新下载好几次项目了;来个人救救孩子吧


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-08-31 11:19:48.359 ERROR org.springframework.boot.SpringApplication:830 - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilterFactoryBean' defined in class path resource : Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate : Factory method 'shiroFilter' threw exception; nested exception is java.lang.NullPointerException
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:270)
        at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:762)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:567)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301)
        at org.jeecg.JeecgSystemApplication.main(JeecgSystemApplication.java:36)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate : Factory method 'shiroFilter' threw exception; nested exception is java.lang.NullPointerException
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
        ... 19 common frames omitted
Caused by: java.lang.NullPointerException: null
        at org.jeecg.config.shiro.ShiroConfig.shiroFilter(ShiroConfig.java:66)
        at org.jeecg.config.shiro.ShiroConfig$$EnhancerBySpringCGLIB$$7c31afd6.CGLIB$shiroFilter$4(<generated>)
        at org.jeecg.config.shiro.ShiroConfig$$EnhancerBySpringCGLIB$$7c31afd6$$FastClassBySpringCGLIB$$6ab5c146.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
        at org.jeecg.config.shiro.ShiroConfig$$EnhancerBySpringCGLIB$$7c31afd6.shiroFilter(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
        ... 20 common frames omitted
Disconnected from the target VM, address: '127.0.0.1:64046', transport: 'socket'

Process finished with exit code 1


页: [1]
查看完整版本: jeeccgBaseConfig对象下的shiro对象是null,导致项目启动失败