日期:2014-05-17 浏览次数:20915 次
<?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>
                    
                    
                    
                    
                    
      
        推荐阅读更多>
      
      
          
        
                       - 
                             关于圆的极坐标方程,该怎么处理 
 
                    
                       - 
                             eWebEditor(JSP版)在Linux下面运行出错有关问题 
 
                    
                       - 
                             response.setHeader方法,设置自动刷新无效解决方法 
 
                    
                       - 
                             String 截取字符串解决方案 
 
                    
                       - 
                             随机迷宫算法-简单异常 
 
                    
                       - 
                             读取数据库信息怎么在select标签中显示,求代码 
 
                    
                       - 
                             怎么遍历类的所有成员变量 
 
                    
                       - 
                             对象引用相关的 
 
                    
                       - 
                             ArrayList 变量随机拼起来 
 
                    
                       - 
                             关于synchronized,该如何解决 
 
                    
                       - 
                             sql语句查询,该怎么处理 
 
                    
                       - 
                             ECLIPSE的小疑点,初学者级 
 
                    
                       - 
                             分只有这么多了,高手帮帮忙,关于http协议的基础有关问题 
 
                    
                       - 
                             请牛人指教解决方法 
 
                    
                       - 
                             求JSP教程解决方案 
 
                    
                       - 
                             抢救!j2me 服务器 
 
                    
                       - 
                             ajax 如何实现后退功能 ,结分, 
 
                    
                       - 
                             菜鸟请问泛型的有关问题 
 
                    
                       - 
                             JSP中写的JS为什么就跳不出来呢?各位前辈帮帮忙解决思路 
 
                    
                       - 
                             struts2文件下载的错误