日期:2014-05-17 浏览次数:21110 次
<?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>
推荐阅读更多>
-
怎么把一个类里所有的String的属性的内容,全部强制转换为GBK
-
tomcat5.0.19 哪有下载吖 以前的帖子上的都下不了啊该怎么处理
-
怎么用JDK的api获得xml文件的一部分
-
请详细解释以下配置文件中的意思?包括方括号里面的信息?该如何解决
-
在eclipse中起动tomcat出现如下警告:请那位大哥解决
-
jsp中怎么存储上传的图片
-
java source解决思路
-
实在不明白了,如何才能在JSP<%%>之间显示出图片呢
-
js
-
java获取真实的下载地址和下载文件名,该怎么解决
-
求一份 表单!
-
怎能让一个包的函数被另一个包中函数调用解决方案
-
求解惑,前不久自己想弄个android+webservice玩玩,开始了解webservice,但是对名词很迷糊
-
Hibernate 子查询有关问题
-
FCKeditor有什么用啊解决办法
-
对Java之王(okgoood)的公开批评解决办法
-
刚刚淘宝网电话面试的几个小问题
-
根据ip取得所在城市
-
晚上年会抽奖,散分攒RP解决方案
-
为何这个IF判断总是出错