日期:2014-05-17 浏览次数:20822 次
<?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>
![]()
推荐阅读更多>
- Java中delete删除不了数据解决方法
- 多线程start有关问题
- 求一本struts2的书解决方案
- JSP表示图片,传递参数路径中有中文时乱码解决方法
- 继承有关问题(复合优于继承)
- struts构架下下载EXCEL文件,怎样控制在选择直接打开后,再通过IE的保存按钮保存时,默认的文件名是所传参数的名字
- 哪位大侠帮小弟我看一下这个“文件传输”代码(文件长度穿不过去)
- 实在做不出来了,100求教高人解决办法
- J2ME上载并读取服务器txt文件
- java httpclient有关问题
- Java包Cipher类,关于DES加密有关问题
- 小弟我希望编写一个上载www.tianya.cn论坛煮酒论史所有的网页
- 这样的逻辑如何实现比较好
- 求安逸的神态
- 为了进步,求java游戏源代码!该如何处理
- java代码中有这样的代码是什么意思.@SuppressWarnings("unchecked"),该怎么解决
- 求解关于Iterator的remove()方法操作后的遍历有关问题
- JavaWeb中常用的WEB服务器有哪些?该怎么处理
- 像小弟我这样的水平如何糊过面试啊
- 小弟我用jbuilder写的一个登陆login.jsp 如何老是出现异常