日期:2014-05-17 浏览次数:20812 次
<?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>
![]()
推荐阅读更多>
- 新手提问:javamail收发邮件之邮件存储,该如何处理
- 如何将javascript的值传给jsp或者form表单
- 关于三层框架SSH中数据处理的方式?该怎么处理
- 求知识,该如何处理
- 有关打印解决方法
- 关于用System.out.print()步骤输出某方法返回的char值
- Java如何画出这样的背景
- getElementsByTagName 不能使用与struts标签吗解决方法
- 编译时错误和运行时错误有什么区别啊
- 帮忙看一看:对于继承
- 请帮小弟我看一下,这段代码,具体功能里面有详细说明。(主要是算法)
- 跪求Java日文式样!(半个月左右能做完的实习项目!)解决方案
- jsf乱码 超难的有关问题 呵呵
- 想找一个好用的HTML的在线编辑框的控件,JS的。解决思路
- 有心得的高手们,请给予指点
- <bean:write/>如何格式化输出时间?一起探讨下,来的都给分
- 怎樣將單擊鏈接時,將此鏈接的id或name傳入jsp變量?该怎么处理
- 新手.struts2的配置有关问题
- SWT中TEXT被拉伸了输入的内容如何居中
- 配置数据源有关问题