日期:2014-05-17 浏览次数:21168 次
<?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>
推荐阅读更多>
-
总算能发300分的帖子了,可是这又有什么用呢。
-
java ssh 保存数据有关问题? 急 待.
-
jfreechart时序图的扩充
-
java如何操作excl导入导出oracle数据库
-
SQL 双条件修改,请教
-
jsp监听器兑现的聊天室
-
请教怎么实现如下效果
-
Comparator排序题,该如何处理
-
一个网站注册时,小弟我想上传照片,怎么实现
-
大家哪位高手有文件上传方面的原代码能否提供最好是使用Commons FileUpload来实现的
-
求JAVA高手帮忙,小弟我有个JAVA程序不会用,只是设置有关问题,一般老手可能会用
-
登录ftp后 网页出错!解决方法
-
求回答,本人想做一个购物(实体商品+虚拟商品)网站,比较全面、完整的数据库
-
哪位高手给个JDK源码下载地址,想学习下JAVA内部的源码
-
jsp 连接数据库错误
-
有哪位高手知道坂田华为基地是个什么公司啊明天就要去面试了!谢啦
-
求个正则:在js里头用正则获取字符串中的Ip地址
-
netbeans7.1使用有关问题
-
HQL多表查询解决方法
-
Hibernate 如何与SQL Server 进行 多对一 映射操作