日期:2014-05-17 浏览次数:20999 次
<?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>
推荐阅读更多>
-
在哪里可以上载JMF
-
急怎么实现内容的上移下移的排序功能
-
实在不明白了,如何才能在JSP<%%>之间显示出图片呢
-
新手又来了。有关问题
-
Myeclipse9.0 不是自带的,其他的也配置好了,tomcat6.0启动不了,该如何解决
-
问2个小疑点,望指教~
-
口试说项目流程说不出来 面试屡碰壁 最终原因
-
大伙儿公司都用什么项目管理软件啊
-
从一个servlet向另一个servlet传值解决思路
-
【资料存储】文本文件与xml的区别
-
Struts2 中DTO怎么使用
-
一个javascript算法求解,请各位帮忙
-
Unicode码转汉语
-
关于Jquery跟后台交互的有关问题
-
提醒Cannot make a static reference to the non-static method
-
JAVAWEB中的域范畴
-
为什么这个程序会产生错误
-
@@@@@@@@@@@@@求救!解决办法
-
初学JSP配好了eclipse+tomcat 为什么Apache中无法显示解决方案
-
action中request不能取得参数,求大神看下代码