日期:2014-05-17 浏览次数:21030 次
<?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>
推荐阅读更多>
-
Chm电子书制作工具,那一款最方便优秀?该怎么解决
-
怎么创建application范围内的class?
-
请教JSDK中的Update是什么意思
-
,怎么使用jndi和datasource链接数据库 并请高手讲解一下JNDI的概念
-
OA公告推送,该如何解决
-
dos上运行java程序 Package的有关问题
-
跪求!尚学堂视频 HTML & CSS & JAVASCRIPT,该如何处理
-
tomcat的lib和WEB-INF的lib解决方案
-
小弟明天要去和一家软件公司人力资源部经理交谈不知道一般会问什么有关问题
-
关于从一个项目的action发送请求到另外一个项目的action获取页面的有关问题
-
ant入门教程解决思路
-
小弟我是特地来拜访一下Java之王的。
-
下面代码,已经实现网页抓取,但是小弟我想用indexOf选取其中的代码
-
麻烦大家帮小弟我看下HashSet用法的小疑点
-
求J2EE项目里一个功能的实现方法,该如何解决
-
突然觉得自己好笨解决方案
-
birt报表报错,该如何解决
-
工作一年的纳闷WEB还是Android
-
hibernate与Struts的有关问题?
-
电脑能否向手机发短信或文件?该如何解决