日期:2014-05-17 浏览次数:21073 次
<?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>
推荐阅读更多>
-
android(java)中的java.net能不能和c#的system.net.sockets进行tcp通信,该如何解决
-
求一份 基于j2ee的用netbeans 跟mysql编写的可用的源码
-
Link List 的节点数据输出有关问题
-
关于表格action的有关问题
-
JFreeChart 如何改变TIP
-
button执行js,调用action的有关问题
-
那些推荐java核心技术卷二的人,你们有没有读过,买了之后悔死了
-
2个集合或者2个数组比较,该怎么处理
-
in thread "main " java.lang.ArrayIndexOutOfBoundsException: 0
-
(急)ssh将mysql中的数据导出到excel中,并上载到本地
-
关于java打印的有关问题
-
求教一个正则表达式,该怎么解决
-
子类会继承父类中的私有的内部类吗
-
action怎么获取session
-
spring自动安装疑问
-
正则表达式怎么表示要匹配无顺序字符呢
-
java编撰聊天室
-
[]一个线程的简单有关问题
-
从网页设计的角度来看,这样的注册页面的用户协议内容是保存在哪里?该怎么处理
-
新手求指教——看看这个有关问题如何解决