日期:2014-05-17 浏览次数:20787 次
<?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>
![]()
推荐阅读更多>
- i++会被线程影响吗?解决方案
- jxl修改已有excel文件,就出警告,大家看看咋回事
- java io的有关问题
- zclass和sclass有啥区别,该如何处理
- showModalDialog中的表单提交有关问题
- 念实现这样一种功能,好像很难的样子.
- 小弟我有个工具程序,是JAVA写的,小弟我不会设置,哪个朋友帮小弟我看看
- 哪位有JAVA编程思想第四版的书上源代码?该如何解决
- 哪位高手能帮小弟我解决JAVA这个有关问题 编译时没错 但是运行时就出错了
- JSP页面引述JS文件无效
- map中目的地的搜索有关问题。怎么建立联系。
- ,问道关于类加载的题目
- 请大伙看看这两代码结果都还ok 就是不知道 效率更好些解决方法
- FileUpLoad路径有关问题
- 批量载入有关问题
- !怎么在HTML页面中加入视频!
- Spring3+Hibernate3(Jpa)怎么 配置同一种数据库 多个数据源
- 一个关于Googlemap的有关问题 大侠们看看吧
- Struts2+spring3.1+jpa事务不提交的有关问题
- J2ME过时否?解决思路