日期:2014-05-17 浏览次数:20928 次
<?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>
推荐阅读更多>
-
想实现jsp页面提示效果哪位高手给指点一下 代码详细一点
-
怎么从购物车里面删除所选项目
-
待,请大家帮帮忙啊关于在Jsp中再打开一个窗口的有关问题!没有那么多积分了,只有20了。帮帮忙
-
几点关于Calendar的疑问解决方案
-
能通过线程的标识号取得某个线程吗?该怎么解决
-
请教各位小弟我写的这个 日期验证不好使如何改?小弟刚学js
-
MyEclipse怎样运行applet程序?解决方案
-
作业 完成不了了呼叫高手,该如何处理
-
class.formName获取的种能做List的泛型类么
-
struts初学报错解决方法
-
关于J2EE错误的处理,关键点
-
javaAPI与javaDOC有什么区别,有明白的人吗?解决思路
-
java 中 不能读取Text的内容解决方法
-
动不动就框架。java,难道就只有框架吗?该如何处理
-
使用struts2后,AJAX的服务端处理用什么代替HttpServlet?该如何解决
-
如何通过本表的字段去查其他表的字段,注意、是通过字段
-
请教哪位高手有jspsmart的组件的下载地址,www.jspsmart.com停止运营了
-
一中型网站项目,寻找学生兼职1-2名解决方案
-
struts.xml配置路径有关问题
-
为什么java.exe CPU资源占用会很高