日期:2014-05-17 浏览次数:20791 次
<?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>
![]()
推荐阅读更多>
- tomcat中server.xml文件配置有关问题
- powerDesigner的用法解决方案
- Java新手有经验的过来人
- 大家采用的都是哪些手段来限制软件试用天数的。用VB6开发的软件怎么实现15天客户试用限制,而又不容易被破解
- 一个正则表达式的小疑点
- 关于文件编码的有关问题,多谢大家了
- 在JSP页面中实现检索数据的分页显示不知道有关问题出在哪里,就是没有办法点下一页
- jna.jar软件包该放在什么地方?该怎么处理
- java新手急求大神解答!解决思路
- MyEclipse搜索替换,该怎么处理
- 高手指导:java从oracle 中读取blob字段转换成字符串后生成了各种字符
- java(simple think in java)解决方法
- 点击按钮,弹出保存、打开对话框解决方案
- [java新手有三问,多谢]hibernate的使用,老师是北京大学的
- 关于jsp中的include有关问题
- 十年小结(八.1):插曲,毕业十周年聚会,情况简报
- java 1debug就出错
- 。小弟我想在jsp页面上传文件 请教如何限制他上传文件的大小呢?在jsp页面里
- ssh getHibernateTemplate().find(queryString, value)带问号的HQL查不出数据解决方法
- 几个关于软件测试面试的有关问题…