日期:2014-05-17 浏览次数:20689 次
<?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>
推荐阅读更多>
- 为什么小弟我想servlet传递中文数据时会出现乱码的情况
- 来挑战上吧
- JAVA为什么在日常的应用中,被使用的很少?都在一些大项目中使用?该如何解决
- 关于paint方法的有关问题
- JAVA有关问题求解
- JAVA边界布局管理器有关问题
- 用java兑现生成一指定范围的随机数列
- 小弟我要疯了,还是复选框的有关问题 最后一次在发复选框的帖子 多谢大家
- struts2上传文件,如何获取文件的后缀名
- 山东省济南都有哪些好的软件公司
- smartgwt文件下传上载
- 为什么小弟我网页上时不时得有莫名其妙的乱码出现呢
- ssh 整合异常
- 请教jsp页面中怎么将int 类型转换为float或者double类型?感谢
- 求教关于TIMESTAMP 相减和 怎么调用下一次循环的数据 多谢
- com.sun.image.codec.jpeg.JPEGImageEncoder在JDK API文档里吗?如何看的
- 如何得到以删除的class文件
- 使用包的servlet需要有什么特殊的配置么?解决方法
- Hibernate出错后怎么初始化
- 有关用户注册有关问题