日期:2014-05-17 浏览次数:21101 次
<?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迷惑
-
一个来访统计的有关问题。
-
HTTP Status 404 - /denglu/Men_Servlet.do,该怎么处理
-
MyEclipse 打包jar文件,cmd下可运行,但是双击不能运行、解决方案
-
log4j 输出中文,该怎么解决
-
J2EE中中文乱码的分析和好决
-
页面显示null报错?该如何解决
-
请问一下高手
-
写了了个helloword,在IDE中运行正常,打包(未混淆)后copy到手机上,提示应用程序无效,该如何解决
-
帮忙解释一下!解决办法
-
请问:用Eclipse 导出jar文件 双击后无法运行
-
怎样在web框架里面屏蔽右键?该怎么处理
-
想实现百度贴吧那种发贴功能,该怎么处理
-
jsp中动态显示当前系统时间,该怎么解决
-
51大家伙儿高兴各~嘿嘿升2星了~散点分兄弟们
-
安卓和J2EE哪个更容易上手一些?哪个更有前景一些,该怎么解决
-
关于String.toString()步骤是创建了一个String对象还是计算出结果直接给别的变量赋值
-
初学者,空指针,邻接表
-
JSP <%= %> 语法有关问题
-
Struts1报错,no type for /user/login,该如何解决