日期:2014-05-17 浏览次数:20913 次
<?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>
                    
                    
                    
                    
                    
      
        推荐阅读更多>
      
      
          
        
                       - 
                             EL表达式在weblogic8中没法使用 
 
                    
                       - 
                             学struts2都要崩溃了,异常s:form tag declares that it accepts dynamic。求指点 
 
                    
                       - 
                             为什么创建对象时失败,该如何解决 
 
                    
                       - 
                             ajax 如何实现后退功能 ,结分, 
 
                    
                       - 
                             数据库图片途径 匹配本地磁盘图片路径 
 
                    
                       - 
                             帮忙看一下hibernate查询的有关问题! 
 
                    
                       - 
                             在使用Swing中的JTree的时候由于数据量过大,应该怎么优化来减少加载时间 
 
                    
                       - 
                             怎么输出正负数的二进制数,要八位的 
 
                    
                       - 
                             添加快捷建解决办法 
 
                    
                       - 
                             oracle数据库如何创建新用户 
 
                    
                       - 
                             J2ME实战:蓝牙联网俄罗斯方块(4)—数据传输序列化与游戏map存储模块( 未完待续。) 
 
                    
                       - 
                             jsp的变量为啥不可以作为js函数的参数 
 
                    
                       - 
                             怎么在java中启动本地程序 
 
                    
                       - 
                             jpa+hibernate一对多双向关联关系更新有关问题 
 
                    
                       - 
                              解析xml引起数据库死锁 
 
                    
                       - 
                             请问下以下语句的区别.. 
 
                    
                       - 
                             java如何去除JSON数组的重复值 
 
                    
                       - 
                             cmwap方式联网的有关问题 
 
                    
                       - 
                             关于日期的有关问题 
 
                    
                       - 
                             关于java里面变量的一个使用方法,该如何解决