日期:2014-05-17 浏览次数:20871 次
<?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>
![]()
推荐阅读更多>
- JSP中生成验证码图片,如何报错误
- 泛型有关问题和jdbc事务有关问题
- 大家来说说程序员的研究方向吧!该如何解决
- 如何在后台获取jsp页面中的多个name一样的值
- 类的定义解决方案
- 初学struts2 配置后启动tomcat报错解决方案
- 请教:j2me是不是只能做手机开发
- java基本类型的默认值解决方法
- 各位说说Spring中MVC是咋回事,多谢
- import net.sf.json.JSONArray中的jar包没法直接获取JSONArray的length属性,求解
- 金额的中文大写形式解决办法
- jquery.html()取值有关问题
- 请教 private static class Entry<E> 中<E> 是什么意思
- [菜鸟]为什么这个程序会抛“java.lang.NullPointerException”
- 问个jfreeChart的有关问题,怎么根据面板坐标获取X、Y轴的值
- java中Double类数字太大,怎么让它直接显示而不要用科学计数法
- java基础JDialog有关问题
- 求职面试时候面对HR的精彩回答【求精】,该怎么解决
- Integer.parseInt(test); 如果test="test"的话。
- 如何用Hibernate 保存一个 list 集合