`
jameszhao83
  • 浏览: 66040 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

王勇的配置

阅读更多
applicationContext-actions.xml
<?xapplicationContext-actionsml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:aop="http://www.springframework.org/schema/aop"
     xmlns:tx="http://www.springframework.org/schema/tx"
     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
          
</beans>
=============================================
<?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:aop="http://www.springframework.org/schema/aop"
     xmlns:tx="http://www.springframework.org/schema/tx"
     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
<!-- 配置sessionFactory -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation">
<value>classpath:hibernate.cfg.xml</value>
</property>
</bean>          

<!-- 配置事务管理器 -->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>

<!-- 配置事务的传播特性 -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED"/>
<tx:method name="del*" propagation="REQUIRED"/>
<tx:method name="modify*" propagation="REQUIRED"/>
<tx:method name="*" read-only="true"/>
</tx:attributes>
</tx:advice>

<!-- 那些类的哪些方法参与事务 -->
<aop:config>
<aop:pointcut id="allManagerMethod" expression="execution(* xxx.xxx.*.*(..))"/>
<aop:advisor pointcut-ref="allManagerMethod" advice-ref="txAdvice"/>
</aop:config>
</beans>

====================================================
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.url">jdbc:mysql://localhost/spring_struts_hibernate</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">bjsxt</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.hbm2ddl.auto">update</property>
</session-factory>
</hibernate-configuration>
===================================================================
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">

<struts-config>
    <message-resources parameter="MessageResources" />
</struts-config>
=================================================================
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
 
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>
====================================================
分享到:
评论

相关推荐

    王勇老师讲解DRP系统源码

    1.基于java开发DRP源码 2.支持mysql数据,包括数据库表结构 3.可以在eclipse下直接运行。

    王勇教程DRP

    王勇DRP,servlet,jsp.html,css,

    Android编程入门很简单.(清华出版.王勇).part2

    王勇)。 压缩打包成2部分,这是第2部分。 本书是一本与众不同的Android学习读物,是一本化繁为简,把抽象问题具体化,把复杂问题简单化的书。本书避免出现云山雾罩、晦涩难懂的讲解,代之以轻松活泼、由浅入深的...

    王勇drp项目分析web开发分析

    掌握Tomcat链接池的配置 熟悉JFreechart的运用 了解验证码技术 熟悉上传组件的运用 掌握动态代理原理 掌握ThreadLocal原理 掌握常用的GoF和J2EE设计模式 掌握分层架构思想 了解SCM 了解XML,XSL、DTD和Schema 了解...

    harbor配置oss1

    harbor配置oss1

    Android编程入门很简单.(清华出版.王勇).part1

    王勇)。 压缩打包成2部分,这是第1部分。 本书是一本与众不同的Android学习读物,是一本化繁为简,把抽象问题具体化,把复杂问题简单化的书。本书避免出现云山雾罩、晦涩难懂的讲解,代之以轻松活泼、由浅入深的...

    论文研究-基于PCI和SelectMAP接口的FPGA动态配置 .pdf

    基于PCI和SelectMAP接口的FPGA动态配置,欧子兴,王勇,随着可编程逻辑器件,特别是FPGA的广泛使用,关于其动态配置的研究也越来越多。在很多实际应用领域中,系统要求在特定的接口环境��

    HIbernate PPT

    全套的hibernatePPt,hibernate集成Struts2 hibernate集成spring hibernate的HQL注释的方式配置文件 hibernate状态 主键映射

    dnxbjyj#jianshu-blog#用ConfigParser模块读写conf配置文件1

    修改某个配置项的值比如要修改一下数据库的密码,可以这样修改:修改完了要写入才能生效添加一个section同样的,要写入才能生效执行上面代码后,sys.conf文

    022 2019年湖南省职业院校技能竞赛云平台服务器配置评分标准-C卷1

    少一个扣1分流表管理(15分)对接ODL后查看S1交换机的流表信息:sudo ovs-ofctl dump-flows s1 -O openflow132分mi

    Swarm和Mesos集成指南-原理剖析

    从今天开始,来自IBMPlatform软件工程师王勇桥将带来“Swarm和Mesos集成指南”系列文章,带大家了解Swarm和Mesos集成的架构和原理,Swarm基于Mesos集群的实战部署和配置,以及基于IBMPlatform自身在资源调度、分布式...

    dubbo原理——框架设计1

    地址:http://dubbo.apache.org/zh-cn/docs/dev/design.htmlconfig 配置层:对外配置接,以 ServiceC

    nginx_tomcat_laya 图文说明1

    1.解压nginx:2.解压tomcat:3.配置tomcat to nginx:4.解压laya-web项目2dcar to tomcat:5.运行tomca

    百度云存储PHP SDK用户手册_V1.01

    第 1 章概述 3第 2 章阅读对象 3第 3 章3.13.2常用配置说明 3第 4 章开发前准备 34.1运行环境 44.2第 5 章使用 SDK 开发应用

    11-2019052854-丁宁-SNORT入侵检测系统1

    步骤3:安装SNORT和WINPCAP步骤4:安装配置MYSQL数据库(由于找不到create_mysql脚本,所以去github下了一个)步骤5:安装ADOD

    ES数据导出工具-升级指导2

    global.properties具体配置说明如下:####常规设置#######数据索引index=pb_sa_phone#索引type,无则可留空type=

    玄铁E902用户手册1

    简介.特点 .可配置选项 .可调试性设计 .版本说明 .第二章 处理器简介结构框图 .紧耦合 IP 架构 .接口概览 .第三章 编程模型工作模式及寄存器视图.通

    实验1要求(做好思考题)1

    实验1- H3C路由器/交换机连接与配置课程名称:计算机网络 实验教学学时:4学时 年级/班级: 学生人数: 专业:软件工程一、实验目的:(1)了解路由器、核心

    制作调试过程及数据记录1

    9.制作调试过程及数据记录1.创建工程时应同时搭建好新的框架 2.建立新的文件时需要在其他引用文件中加入相关配置,新文件取名字要规范,方便编程 3.Caused

Global site tag (gtag.js) - Google Analytics