日期:2014-05-17 浏览次数:21383 次
<?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>
推荐阅读更多>
-
关于list有关问题
-
java中protected所属类子类中有关问题
-
flash插件不随鼠标滚动,该怎么解决
-
急怎么判断和识别URL所连接的下载的文件的文件名和后缀
-
JavaEE框架 树状结构菜单的跳转(<sx:tree>),该如何处理
-
一个有关分辨率的有关问题
-
JSP线程保险
-
父类引用指向子类对象解决方法
-
怎么编写java代码,来实现调用java.exe并执行.class文件
-
有关组合(composition)的有关问题,请求好心人回答
-
采用Hibernate作数据层.程序运行一段时间报内存不够.关呼下岗有关问题.一定来帮助啊
-
JaveWeb用Applet加载Dll文件怎么实现
-
顺利驱除老鼠 - 散分
-
怎么配置Java运行环境
-
定义数组存储10个数据,将数组中最大数放到第一个元素。多谢咯
-
ext toolbar 动态添加过多有关问题
-
StringBuilder跟StringBuffer的区别
-
java读取oracle中 TIMESTAMP字段
-
Tomcat启动时,org.springframework.web.context.ContextLoaderListener出错
-
高手一个SQL的有关问题