日期:2014-05-17 浏览次数:20801 次
<?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中生成一维码有关问题
- netbeans 如果将项目移除(不删除项目,就无法再次用netbeans打开该项目,这是咋回事
- web系统实现短信群发解决方案
- jsp数据显示解决方法
- Java怎么将数据库里读出来的List<对象>集合写出txt文本?大神们,
- 怎么用jsp获得局域网内各个机器的IP
- 为什么扣了小弟我的分,小弟我却不能下载下来东西啊
- 求坛友帮忙,该怎么处理
- 请问一个平面几何和图形方面的算法有关问题
- <base href="<%=basePath%>"> 有关问题
- 为什么答案是01234456, 6也可以输出来?解决办法
- 在一个form表单中,有<input type="text" name="id"> 怎么把输入的数据(value)传递到另一个页面,然后从那个页面读出来
- Java种的放置顺序
- 两个web系统,sso(单点登录)如何做
- 怎么将一个类对象转化成另一个Interface
- JSP文档解决方法
- 怎么在tomcat中配置虚拟主机,帮我看看我的dns配的对不对
- 为什么小弟我这个程序中的变量x与y不能显示