日期:2014-05-17 浏览次数:21378 次
<?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>
推荐阅读更多>
-
MyEclipse Package Explorer没有项目显示是咋回事
-
service注入空指针,求找错!该怎么处理
-
select标签,该如何解决
-
IO流求大神解决方案
-
java 中如何把二进制01序列转换成ASCII码?(01序列为一个字符串,各ASII码对应的01序列已用空格隔开)
-
。myeclipse启动的项目后无法访问
-
关于黄金分割数0.618的标题,有疑惑,求解
-
抽象类,接口解决办法
-
【初学者】想在网站上加一个定时删除数据的功能
-
上网不定时掉线解决思路
-
SSH项目,原来用的 Mysql数据库,现下换SQl2000为什么报错了?求指点
-
jsp 空指针的有关问题?
-
webLogic,该怎么解决
-
请问大牛,小弟我写的程序编译没有错。解释时老是出现异常:Exception in thread "main" java.lang.NullPointerExcept
-
[200分]通过以下DAO操作proxool连接池访问量大的时候,老是有有关问题?DAO如下
-
未来手机程序开发的畅想解决方法
-
培训和不培训的本科生到底有什么区别解决思路
-
用POI读excel获取单元格内容有关问题,能否像jxl一样不用按类型获取,全转成字符串(看起来是什么得到的就是什么)
-
怎么判断标签<html:checkbox>是否被选中?js代码该如何写
-
下传报错java.io.FileNotFoundException