日期:2014-05-17 浏览次数:20788 次
<?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>
![]()
推荐阅读更多>
- !兄弟快过来看看
- 大家帮小弟我调试一个小程序,关于instanceof
- java接收文件有关问题
- 怎么下载Spring3.2.4开发包
- JAVA生成对象new方法一个不理解的地方解决思路
- 帮帮忙!现在要实现邮件发送(还必须要匿名发送)!该怎么解决
- 老师布置了一道作业(英文的),不会做啊,高手们能指点一下吗?多谢
- 急HttpURLConnection无限等待的有关问题!
- WebContent下的目录的页面表单怎么提交到后台的action?表单的action属性如何写路径
- 毕业设计是干嘛滴?解决方法
- 对于for的用法
- JAVA程序开发,有DEBUG和RELEASE版本的说法吗,该怎么解决
- 标题求解答
- 这是一道面试题目,求解(这段代码怎么改错)
- netbean新手解决方案
- 高分关于java验证框架的有关问题
- 取得对象数组的内部锁,是否也意味着取得每个对象的内部锁?该如何解决
- 一个struts1的有关问题,一个页面的数据插入到2个表中.
- Hibernate 容器 为什么小弟我的插不进数据库东西
- 有开发过CA认证的朋友,帮个忙!解决方案