日期:2014-05-17 浏览次数:20790 次
<?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 json乱码解决思路
- 岂有此理的空指针,struts2框架报错
- 们 哪位高手知道MyEclipse编译有关问题
- java远路文件转成输入流之后写给浏览器,达到下载该文件的效果,在window中运行正常,linux中无法下载
- 请教motorola v3i手机的registry.txt文件在哪个目录下?遇到签名的有关问题,必须修改这个文件?
- switch()使用有关问题
- JDBC连接Oracle11gR2的有关问题.
- 求个java 叫加密解密算法!大家帮帮忙,
- j2me中怎么实现滚动条
- jsp页面怎么开启IE10的兼容模式
- Socket客户端不能接收到服务器数据呢?解决方法
- JSP+HIBERNATE有关问题
- 还是struts 传递参数的有关问题
- 请教如何在linux下使用脚本调用ghost还原linux硬盘(还原系统)
- 请诸位大神解释下一段代码
- 工作一年了,感到技术该更新了,可一时迷茫不知从何做起,该怎么处理
- 使用JS提交form表单有关问题~
- 如何没有搜索帖子的功能
- Jcreator解决方法
- javabean的概念解决方法