root_ning 发表于 2022-6-13 09:40:24

使用archetype生成新微服务模块

使用archetype生成新微服务模块   v_3.2.0 + 版本后请用这个命令

windows 环境    项目启动报错
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-06-13 09:26:24.004 ERROR 8260 --- [         main] o.s.boot.SpringApplication               : 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.JeecgErpCloudApplication.main(JeecgErpCloudApplication.java:20)
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:67) ~
        at org.jeecg.config.shiro.ShiroConfig$EnhancerBySpringCGLIB$25c7e125.CGLIB$shiroFilter$2(<generated>) ~
        at org.jeecg.config.shiro.ShiroConfig$EnhancerBySpringCGLIB$25c7e125$FastClassBySpringCGLIB$342f6a8b.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$25c7e125.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


// 注意: windows下可直接复制执行, Linux/Macos下^ 修改成\mvn archetype:generate ^   -DgroupId=org.jeecg.modules.erp ^   -Dmodule=erp^   -Dmodule-up-first=Erp^   -DartifactId=jeecg-module-erp ^   -Dversion=3.1.0^   -DarchetypeGroupId=org.jeecgframework.archetype ^   -DarchetypeArtifactId=jeecg-cloud-gen ^   -DarchetypeVersion=3.0.1

页: [1]
查看完整版本: 使用archetype生成新微服务模块