日期:2014-05-17 浏览次数:21078 次
<?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>
推荐阅读更多>
-
Java调用批处理bat文件产生的乱码有关问题
-
请高手来做个JAVA算法题解决办法
-
java多线程 Socket解决思路
-
,这里有个简单的有关问题,但小弟我完全没头绪
-
csdn博客中 怎么添加 标准代码格式的代码
-
如何打印这样的是三角形啊 用java
-
怎么引用classes下Authenticator子类
-
跪求啊找到Int;需要int[];该如何处理
-
哪位高手有JAVA的源码
-
双数组冒泡排序有关问题,请各位帮忙解决!
-
in thread "main " java.lang.ArrayIndexOutOfBoundsException: 0
-
properties 配置文件找不到途径
-
集合类各排序的区别?该怎么处理
-
Hibernate 3.6:org.hibernate.ObjectNotFoundException,该如何解决
-
讨论hash键值的有关问题
-
嵌入式设备和HTTP服务器通信,该如何解决
-
下海的j2EE职位为何这么少?冬天来了么?
-
google 在 google.cn 推出了 google suggest解决办法
-
带新人学J2EE,有想法者请进.只带新人.有浓厚兴趣的.该怎么处理
-
java中的 JTable 报表 能否显现这个功能