日期:2014-05-17 浏览次数:20825 次
<?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最笃学习哪门数据库呢
- 请教 做了一个窗体的程序,创建很多窗口,用什么语句可以退出整个程序 ?
- 问个外行的有关问题<bean:write name="index"/>索引能从1开始嘛
- socket是怎样实现的 会用到什么代码?解决方案
- 读取Hibernate属性文件,该如何解决
- 有人知道吗 有没有第三方库可以解压7z跟rar文件的
- JSP URL重写有关问题(高分奖励)
- HTTP Status 500异常 新手有关问题(jsp+tomcat+sql)
- java中怎么得到所在工程的名字
- eclipse 经典版,最新稳定版是多少?解决方法
- 小弟我是java新手,在看thinking in java, 有有关问题请问
- java webservice无论是应用哪个jar包调用时都提示NoClassDefFoundError
- proxool连oracle长时间没用,会Io 错误: Connection reset oracle
- 分享个笔考题
- JSP学习亟需注意什么
- 用eclipse写的Java文件如何用propertiesk呀
- 怎么自动生成符合需求的流水号
- JAVA能监听数据库内容变化情况?解决办法
- 现在用j2se做工控领域前途如何样
- tomcat信息?该怎么处理