java防止vba注入,java – Spring问题:创建bean时出错并注入自动连接的依赖项失败...

HTTP Status 500 – Servlet.init() for servlet mvc-dispatcher threw

exception

type Exception report

message Servlet.init() for servlet mvc-dispatcher threw exception

description The server encountered an internal error that prevented it

from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet

mvc-dispatcher threw exception

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

java.lang.Thread.run(Thread.java:745)

root cause

org.springframework.beans.factory.BeanCreationException: Error

creating bean with name ‘stockController’: Injection of autowired

dependencies failed; nested exception is

org.springframework.beans.factory.BeanCreationException: Could not

autowire field: private com.ve.common.service.StockService

com.ve.common.controller.StockController.stockService; nested

exception is

org.springframework.beans.factory.NoSuchBeanDefinitionException: No

qualifying bean of type [com.ve.common.service.StockService] found for

dependency: expected at least 1 bean which qualifies as autowire

candidate for this dependency. Dependency annotations:

{@org.springframework.beans.factory.annotation.Autowired(required=true)}

org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)

org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)

org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)

org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)

org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)

org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)

org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663)

org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629)

org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677)

org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548)

org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489)

org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)

javax.servlet.GenericServlet.init(GenericServlet.java:160)

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

java.lang.Thread.run(Thread.java:745)

root cause

org.springframework.beans.factory.BeanCreationException: Could not

autowire field: private com.ve.common.service.StockService

com.ve.common.controller.StockController.stockService; nested

exception is

org.springframework.beans.factory.NoSuchBeanDefinitionException: No

qualifying bean of type [com.ve.common.service.StockService] found for

dependency: expected at least 1 bean which qualifies as autowire

candidate for this dependency. Dependency annotations:

{@org.springframework.beans.factory.annotation.Autowired(required=true)}

org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)

org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)

org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)

org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)

org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)

org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)

org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)

org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)

org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663)

org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629)

org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677)

org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548)

org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489)

org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)

javax.servlet.GenericServlet.init(GenericServlet.java:160)

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

java.lang.Thread.run(Thread.java:745)

root cause

org.springframework.beans.factory.NoSuchBeanDefinitionException: No

qualifying bean of type [com.ve.common.service.StockService] found for

dependency: expected at least 1 bean which qualifies as autowire

candidate for this dependency. Dependency annotations:

{@org.springframework.beans.factory.annotation.Autowired(required=true)}

org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301)

org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1047)

org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)

org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)

org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)

org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)

org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)

org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)

org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)

org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)

org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)

org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663)

org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629)

org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677)

org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548)

org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489)

org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)

javax.servlet.GenericServlet.init(GenericServlet.java:160)

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

java.lang.Thread.run(Thread.java:745)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值