当前位置: 代码迷 >> Java Web开发 >> 关于Spring配置文件的有关问题
  详细解决方案

关于Spring配置文件的有关问题

热度:150   发布时间:2016-04-17 10:15:33.0
关于Spring配置文件的问题
我是新手,在做实现增删改查的功能的模块,spring文件有问题,大家帮看看,小女感激不尽!
applicationContext.xml
Java code
<beans    xmlns="http://www.springframework.org/schema/beans"    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">        <bean id="UserUpdateInterceptor"        class="com.hollycrm.hollyv8.zsptest.zsp.service.UserUpdateInterceptor" />            <bean id="zsptest"        class="org.springframework.aop.framework.ProxyFactoryBean">    </bean>        <bean id="UserManagerDao" class="com.experiment.Dao.DapImpl.UserManagerDaoImpl">        <property name="zsptest" ref ="zsptest"></property>           </bean>            <bean id="UserManagerService" class="com.hollycrm.hollyv8.zsptest.zsp.service.impl.UserManagerServiceImpl">       <property name="userManagerDao" value="UserManagerDao" ></property>    </bean>        </beans>

错误如下:
Java code
2012-4-12 9:48:30 org.apache.catalina.core.StandardContext listenerStart严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserManagerDao' defined in class path resource [applicationContext-zsptest.xml]: Cannot resolve reference to bean 'zsptest' while setting bean property 'zsptest'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'zsptest': org.springframework.beans.factory.FactoryBeanNotInitializedException: Cannot determine target class for proxy    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)    at java.security.AccessController.doPrivileged(Native Method)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)    at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)    at org.apache.catalina.core.StandardService.start(StandardService.java:516)    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)    at org.apache.catalina.startup.Catalina.start(Catalina.java:593)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    at java.lang.reflect.Method.invoke(Method.java:597)    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'zsptest': org.springframework.beans.factory.FactoryBeanNotInitializedException: Cannot determine target class for proxy    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:124)    at java.security.AccessController.doPrivileged(Native Method)    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91)    at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1288)    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:217)    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)    ... 42 more2012-4-12 9:48:30 org.apache.catalina.core.StandardContext start严重: Error listenerStart
  相关解决方案