日期:2014-05-17 浏览次数:21125 次
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<constant name="struts.devMode" value="true"></constant>
<constant name="struts.objectFactory" value="spring"></constant>
<package name="Microblogging" extends="struts-default">
<action name="UserLoginAndRegist" class="cn.edu.bzu.Microblogging.Action.UserLoginAndRegist">
<result name="success">/jsp/webPage/user_index.jsp</result>
<result name="input">/jsp/prompt/regist_prompt_failure.jsp</result>
</action>
</package>
</struts>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"><value>classpath:hibernate.cfg.xml</value></property>
</bean>
<!-- 事务管理器 -->
<bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<aop:config proxy-target-class="false">
<aop:pointcut id="transactionPointcut" expression="execution(* cn.edu.bzu.Microblogging..*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="transactionPointcut"/>
</aop:config>
<!-- 通知 -->
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="get*" read-only="true" propagation="NOT_SUPPORTED"/>
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
<!-- Spring自动扫描 -->
<context:component-scan base-package="cn.edu.bzu.Microblogging"/>
</beans>
推荐阅读更多>
-
一个关于jsp开发分页技术的不解
-
hibernate 连番.
-
jQuery中的弹出窗口如何写?相当于html中的alert()
-
遇到个小疑点 进来解答下
-
将一个正整数分解质因数,求JAVA代码(要求不能用while语句)解决方案
-
怎么在BS方式上加入一些文本编辑功能
-
socket能否返回一个值,显示短信是否发送成功?该如何处理
-
HibernateDaoSupport里用什么步骤能进行多条件查询
-
困惑,求解,该如何处理
-
jsp错误追踪机制
-
finally块中的代码一定会实施吗
-
【散分】春光尚好,人间寂寥
-
找工作(深圳),该如何解决
-
Java生产者消费者模型代码解决思路
-
TOMCAT用不了!解决方案
-
存储过程 急该如何处理
-
大型网站一般用什么操作系统做服务器?该如何解决
-
悲剧是怎样诞生的,小弟我和女朋友谈了3年恋爱了,给他爸打电话他爸装自己不知道,那叫一个尴尬
-
怎么快速判断一串数字中连零的个数。 注:不能用循环 多谢
-
大家伙儿找外包赚外快,都去哪找