日期:2014-05-17 浏览次数:21365 次
<?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>
推荐阅读更多>
-
用Xfire开发webservice错误:illegalStateException:can't overwrite cause
-
JBuilder+Weblogic启动报错解决办法
-
亟需答案!
-
SOS ~ 怎么实现网站登录的功能
-
单选按钮的名字是可改变的 如何获取他的参数啊
-
nokia5800 开发J2ME游戏 怎么禁止竖屏
-
系统加载不上,求相助
-
spring 的有关问题
-
字符串“Mon Dec 31 00:00:00 CST 2012”转换成日期有关问题
-
求教一个小疑点,看不懂.
-
java2012面试笔试心得及吐槽解决思路
-
如何想都想不明白。明明按视频教程里写的是死锁,如何还能循环呢
-
求用swing干的较好的办公软件操作界面例子,不要太玄的那种
-
hibernate 关联有关问题
-
JNI 删除本地引用后,怎么判断已经被JVM回收掉了
-
请编写一个有关RMS的程序,实现手机的增删改查,该如何解决
-
Caused by: java.net.BindException: Address already in use: connect
-
为什么不能进行验证,该如何解决
-
手机 网页 ,
-
java 中有没有内存储器流,可以先写入数据,再读取数据