日期:2014-05-17 浏览次数:20869 次
<?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>
![]()
推荐阅读更多>
- 刚刚接触axis,看不懂代码 求代码注释!
- 计算机专业分方向,大家给个建议解决方案
- 告诉您一个真实的秘密:Java太烂了!会被淘汰
- 请教如何成为“牛人”
- Java 打包 成jar 文件后运行程序生成一个txt文件,但它不在jar文件中,而是和jar文件在同一级目录下,该怎么解决
- 指出下段程序中的有关问题
- org.apache.lucene.queryParser.ParseException这个错误呀,我从没见过,该如何处理呀,苦恼啊
- 求高手详细解释一下这段java代码,该如何处理
- 急(求教高人)解决方法
- java发送带附件的邮件,为啥邮箱内容直接显示的附件里面的内容?
- 关于Servlet读取Html表单数据的有关问题
- 求解,该如何解决
- hql语法 查询对象的差别
- 引用变量的指向可以是多个吗解决思路
- 请教weblogic哪个版本最好用?应用的最广泛?小弟我要配合ORACLE9使用
- s2sh框架的搭建?该怎么解决
- java 向oracle 批量安插数据
- 跪求ibatis in action中文版电子书下载!该怎么处理
- org.hibernate.LazyInitializationException: could not initialize proxy - no Session
- 设置jsp下拉菜单不可修改解决方案