日期:2014-05-17 浏览次数:21207 次
<?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>
推荐阅读更多>
-
运用chain形成Action链后查询为null?解决思路
-
入门者学习门坎:关于源代码
-
对于用jxl又一问:关于表格边框的设置
-
问问大家网页布局侧重用table好,还是侧重用div好解决思路
-
eclipse.com下载的IDE是不带jdk/jre的对吧?该怎么解决
-
jsonp返回结果解析有关问题!
-
拦截器的有关问题,求大神进
-
java代码中执行数据库字段属性有关问题
-
请教:String s1 = new String("abc");和String s2 = "abc"有什么不同
-
java 程序,编译无法通过
-
form.getForm.findFeild("idorname").setValue(a);解决方法
-
新学JAVA,老师给了两道题,但每个有关问题都只解决了一半,请大家地点一下
-
JAVA 中有什么样的 文件浏览控件可以支持多种文件的浏览解决方案
-
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]l?ռ?ߵ?һ? hstmt
-
【求教】怎么获取jar包外部的配置文件
-
在SQL话语里 这个符号“:”什么意思
-
新手,非常非常感谢
-
关于finally的范围解决方法
-
面向对象解决办法
-
SB-代码民工-高级程序员-大牛解决办法