ssh框架对数据库进行修改和删除时的applicationContext.xml如何配置
Struts版本:2.3.16,Spring版本:4.0.6,Hibernate版本:4.3.6运行项目报错org.springframework.beans.facto...
Struts版本:2.3.16 ,Spring版本:4.0.6 ,Hibernate版本:4.3.6
运行项目报错
org.springframework.beans.factory.BeanCreationException org.springframework.beans.factory.BeanCreationException:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\apache-tomcat-8.0.9-windows-x86\apache-tomcat-8.0.9\webapps\SSHDemo\WEB-INF\classes\applicationContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Cannot resolve reference to bean 'serviceOperation' while setting bean property 'pointcut'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceOperation': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException
是什么问题 展开
运行项目报错
org.springframework.beans.factory.BeanCreationException org.springframework.beans.factory.BeanCreationException:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\apache-tomcat-8.0.9-windows-x86\apache-tomcat-8.0.9\webapps\SSHDemo\WEB-INF\classes\applicationContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Cannot resolve reference to bean 'serviceOperation' while setting bean property 'pointcut'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceOperation': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException
是什么问题 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏10(财富值+成长值)
2014-09-05
展开全部
对数据库的操作与applicationContext.xml的配置无关。这个文件主要是用来配置sessionfactory的,你看下你的bean有没有配置正确。
大概是这样配:
<bean id="UserDao" class="onlinestock.dao.impl.UserDaoImpl">
</bean>
<bean id="UserService" class="onlinestock.service.impl.UserServiceImpl">
<property name="UserDao">
<ref bean="UserDao" />
</property>
</bean>
<bean id="UserAction" class="onlinestock.action.UserAction">
<property name="UserService">
<ref bean="UserService" />
</property>
</bean>
大概是这样配:
<bean id="UserDao" class="onlinestock.dao.impl.UserDaoImpl">
</bean>
<bean id="UserService" class="onlinestock.service.impl.UserServiceImpl">
<property name="UserDao">
<ref bean="UserDao" />
</property>
</bean>
<bean id="UserAction" class="onlinestock.action.UserAction">
<property name="UserService">
<ref bean="UserService" />
</property>
</bean>
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询