日期:2014-05-17 浏览次数:20844 次
<?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>
![]()
推荐阅读更多>
- 网站没访问几次就无限等待了~该如何处理
- 找一个J2EE银行系统源码,网上有发布,非常好但小弟我不得哪下载,描述内详
- 读文件 . 不是很熟悉java,看看为什么出现异常
- 关于infomix下setQueryTimeOut的有关问题
- 关于搜索方面的咨询,该怎么处理
- java如何读取某个文件夹下边的最新文件的名字
- String字符串形式的数学运算怎么得到结果
- 请教大家一个关于struts1+hibernate+spring整合配置的文件(急)
- GUI事件处理有关问题
- 创办 J2EE 应用程序客户端
- JfreeChart1.0.2画饼图怎么去掉Label显示
- 小弟我是学java的,在公司做了个java项目,现在公司让学pb
- 如何通过ajax传递ArrayList<HashMap>给action
- 请教JSP中的readLine最多能接受多少字符?假如我的文章一直不换行的话它都能读进去吗?它有限制么
- Hibernate关联有关问题
- Integer rval = (String)r;这句话不懂亦解决方案
- 为什么main函数中创建的对象,可以调用main函数所在类的私有方法?解决方法
- SCRIPT解决方法
- java 中窗口中加背景图片解决方法
- 小弟我是java新手,老师叫小弟我写猜拳游戏,然后出了点有关问题