日期:2014-05-17 浏览次数:21411 次
<?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>
推荐阅读更多>
-
方法参数及返回值的有关问题
-
关于开发工具解决办法
-
谁能讲解一下这段代码?整数范围如何控制在10万以内
-
工作经验从哪里来?有没有私活外包的,该如何处理
-
请问:关于Java书写的一二三。
-
不适用任何框架,怎么获得请求中的参数
-
v.remove("Test0");有什么用?该怎么解决
-
完整的JAVA调用存储过程的代码,请给的详细,必解贴
-
4.2juno作的代码导入3.6Helios报错
-
问个线程初级有关问题
-
怎么跳到上一页
-
关于 “蓝桥计划”,该如何解决
-
关于java线程的一个有关问题
-
tomcat做web服务器有没有连接限制啊该如何解决
-
请教怎么修改TINYMCE的advimage或者自己开发一个PLUGIN,并怎么设置上传的页面?怎么返回数据到TINYMCE的TEXTAREA区中呢
-
为什么用struts2做分页的时候总是报这个异常呢
-
!jsp代码有错。
-
想了解下jquery怎么迭代出action中的list
-
java 与java脚本的区别,该怎么解决
-
关于Quartz_Job_Scheduling_Framework java中作业调度的有关问题