日期:2014-05-17 浏览次数:21265 次
<?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>
推荐阅读更多>
-
在servlet写的代码中加入html标签,浏览器没法解析是什么原因
-
SimpleDateFormat的现实应用
-
请大家帮着看看这个时间函数如何写。小弟初来乍到就只有这20分
-
java自学难吗?解决办法
-
设计输出如下形式数值的函数,该怎么处理
-
为什么小弟我在html中可以正常用javascript,然后复制到jsp中就不行了呢
-
java 正则表达式 matcher.find()与group(i),该怎么解决
-
javax.servlet.ServletException: requested URL string is null,该怎么解决
-
关于包和protected方法有关问题
-
JAVA小疑点,麻烦一下前辈了。
-
挑战能力的一个有关问题分析,敢不敢进来尝试一下
-
关于一个简单的正则表达式。如何都搞不定。求教
-
java web中的url地址小疑点。
-
菜鸟求书以及个别有关问题
-
JSTL标签 怎样判断字符串相等?解决办法
-
求解 File对象在servlet中参数的有关问题
-
求引路
-
开放项目实际是如何运行的
-
关于用递归求list的和的有关问题
-
帮助文档解决思路