前兩天公司做java同事離職,新的人員也還沒有招來,所以后端的事就先接手了, 本身對java 不是很了解,遇到點麻煩,摸索了兩天實在無解,求大神 幫忙~
工程檔案在他電腦上運行正常,但是我把專案檔案直接復制到我的電腦上,出現了一些問題:


Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cartServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memberServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'goodsServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productImageServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'abcPaymentPlugin' defined in file [D:\Program Files\tomcat\apache-tomcat-8.0.30\apache-tomcat-8.0.30\webapps\ROOT\WEB-INF\classes\com\movitech\plugin\abcPayment\AbcPaymentPlugin.class]: Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:308) ~[spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1186) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:450) ~[spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:424) ~[spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:549) ~[spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:305) ~[spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE]
... 60 common frames omitted
網上搜了一一些類似的問題,但是感覺應該事哪里配置的問題,求大神幫忙~
uj5u.com熱心網友回復:
把你的代碼service和serviceImpl代碼截圖貼出來uj5u.com熱心網友回復:
看看這個類是否有編譯錯誤 AbcPaymentPluginuj5u.com熱心網友回復:
spring容器創建AbcPaymentPlugin的實體時創建失敗了,然后連鎖反應影響到了參考到AbcPaymentPlugin的類的實體創建。所以AbcPaymentPlugin這個類應該有問題,解決它以后再試試。uj5u.com熱心網友回復:
凡是例外里有cause by的,請貼出最后幾個cause by出來轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/91767.html
標籤:Web 開發
