`
Xgw123485
  • 浏览: 87547 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

S2Si实例

 
阅读更多
web.xml的内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
 
  <display-name>ESB</display-name>
 
  <!-- spring监听器 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext-beans.xml
</param-value>
</context-param>

<!-- 监听器 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
 
  <filter>
  <filter-name>struts2</filter-name>
  <filter-class>
  org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
  </filter-class>
  </filter>
  <filter-mapping>
  <filter-name>struts2</filter-name>
  <url-pattern>*.action</url-pattern>
  </filter-mapping>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>   
  </web-app>


spring的配置文件applicationContext-beans.xml的内容如下:
<?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"
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 ">

<bean id="DataSource" class="org.apache.commons.dbcp.BasicDataSource">

<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@localhost:1521:ESB" />
<property name="username" value="system" />
<property name="password" value="ngbss" />
</bean>


<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation" value="classpath:SqlMapConfig.xml" />
<property name="dataSource" ref="DataSource" />
</bean>

<bean id="sqlMapClientTemplate" class="org.springframework.orm.ibatis.SqlMapClientTemplate">
<property name="sqlMapClient" ref="sqlMapClient"></property>
</bean>

<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="DataSource" />
</bean>

<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED" />
<tx:method name="up*" propagation="REQUIRED" />
<tx:method name="del*" propagation="REQUIRED" />
<tx:method name="*" read-only="true" />
</tx:attributes>
</tx:advice>

<aop:config>
<aop:pointcut expression="execution(* com.huawei.ngbss.impl.*.*(..))"
id="ImplPoincut" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="ImplPoincut" />
</aop:config>

<bean id="userDao" class="com.huawei.ngbss.dao.UserDao">
<property name="sqlMapClientTemplate" ref="sqlMapClientTemplate"></property>
</bean>

<bean id="userImpl" class="com.huawei.ngbss.impl.UserImpl">
<property name="userDao" ref="userDao"></property>
</bean>

<bean name="UserAction" class="com.huawei.ngbss.action.UserAction">
<property name="service" ref="userImpl"></property>
</bean>
</beans>
分享到:
评论

相关推荐

    s2si框架 ssi框架 structs2+spring+ibatis组合框架(内含例子)

    "S2SI框架",全称为"Structs2+Spring+Ibatis集成框架",是一种基于Java的Web开发框架,旨在简化企业级应用的开发过程。该框架结合了三个流行的开源组件——Structs2、Spring和Ibatis,以提供一个高效、灵活且易于...

    实验 汇编实例(8个)

    `NEXT`循环通过`MOV AL, [SI]`和`MOV [DI], AL`将S1中的字符逐个移动到S2中,并通过`INC SI`和`INC DI`递增指针,`LOOP NEXT`完成30次迭代。 实验报告应记录整个调试和练习的过程,包括每一步的操作和观察结果,以...

    汇编语言课程\清华大学课件\编程实例

    程序首先将`S1`和`S2`的偏移地址分别加载到`SI`和`DI`寄存器,然后初始化`CX`为30,表示需要复制30个字符。在`LOOP`指令的循环中,`AL`寄存器用于临时存储`SI`指向的字符,然后将其存入`DI`指向的位置。每次循环后,...

    struts2+spring+ibatis框架实例

    "struts2+spring+ibatis框架实例"是基于这三个框架的一个集成示例,它利用MySQL作为后端数据库。下面我们将详细探讨这三个框架及其在实际项目中的应用。 **Struts2框架** Struts2是MVC(模型-视图-控制器)架构模式...

    struts2+spring+ibatis 实例(含源码)

    文件列表中的"s2si"可能是指Struts2-Spring-iBatis的集成项目。项目中通常会包含以下部分: 1. `struts.xml`:Struts2的核心配置文件,定义了Action和Result的映射。 2. `spring-context.xml`:Spring的配置文件,...

    开源框架整合

    "SSI"、"S2SI"、"S2SH"、"SI"、"SH"、"SSH"和"S2SH"这些缩写分别代表了不同的Java Web开发框架。接下来,我们将深入探讨这些框架以及它们之间的整合。 1. Struts(S):Struts 是 Apache 组织下的一个开源项目,是...

    定时器1计数器实验.rar

    配套的基础实验程序实例是学习过程中极其重要的部分,它们帮助读者将理论知识转化为实际操作,加深对ARM7处理器及其应用的理解。"定时器1计数器实验"是这些实验中的一个,旨在教授如何利用LPC213X或LPC214X系列芯片...

    实验二_GPIO接口及其外部中断的应用_

    按键SI和S2被连接到MSP430F5529LP的GPIO端口,当按下这些按键时,相应的LED1和LED2将被点亮,再次按下则熄灭。这个过程涉及到了以下几个关键知识点: 1. **GPIO配置**:在程序开始时,我们需要设置GPIO端口的工作...

    整合spring+Strus2+Hibername or Ibatis

    在提供的压缩包中,"S2SI连接oracle.rar"和"S2SI连接mysql.rar"表明了该示例项目支持Oracle和MySQL两种数据库。整合SSH时,需要修改相应的数据库连接配置,如数据库URL、用户名、密码等信息,以适应不同的数据库...

    博弈论的数学模型.pdf

    在n人博弈中,用Si为参与者i的可以选择战略空间,其中任意一个特定的纯战略为si,si∈Si,n元函数ui(s1,s2, ⋯ ⋯ sn), 当n个博弈者的决策为s1,s2,⋯ ⋯ sn时,表示第i个参与者的收益函数。 二、博弈的解 当...

    强度理论变幅载荷疲劳寿命预测1PPT教案学习.pptx

    本文将详细介绍强度理论变幅载荷疲劳寿命预测的基本概念、计算方法和应用实例。 疲劳寿命预测的基本概念: 1. 疲劳寿命:指机件在疲劳载荷下的使用寿命。 2. 变幅载荷:指机件在实际使用过程中所承受的周期性载荷...

    汇编小程序示例

    之后,程序通过另一个内循环(标签为S2)放置颜色属性。`pop bx`恢复颜色索引,`mov al, ds:10h[bx]`获取颜色属性,然后循环放置这些属性。 外循环结束后,恢复之前保存的值,`pop ax`恢复字符串首地址,`add ax, 0...

    算法的时间复杂性PPT学习教案.pptx

    在这个PPT学习教案中,首先通过一个改进的冒泡排序算法实例来引入时间复杂性的概念。冒泡排序在不同情况下,如输入数据已排序或完全无序,所需的基本操作次数差异显著,这揭示了对于大规模问题,了解算法在各种输入...

    有机化学基本理论PPT学习教案.pptx

    PPT列举了从氢(H)到硅(Si)的元素的原子序数、电子轨道图和元素符号,显示了原子的电子配置如何随着原子序数的增加而变化,如氮(N)的电子结构为1s2 2s2 2p3,氧(O)的电子结构为1s2 2s2 2p4。 这些基本理论...

    introduction to HMM

    - **应用实例**:70年代初,HMM首次应用于自动语音识别系统,如卡内基梅隆大学的“Dragon”系统以及IBM的研究成果。 - **广泛应用**:自20世纪80年代中期以来,HMM在自动语音识别领域占据了主导地位,并逐渐扩展到...

    云计算-词语相似度计算方法研究.pdf

    设目标词语W具有n个词义Sl、S2、…、sn,W在特定的上下文环境里只有S7是正确的词义。词义消歧的任务就是在这n个词义中确定词义S7是哪一个。每个词义Si和W的具体使用环境C存在或强或弱的相关性。设两者的强度关系函数...

    struts2+spring+ibatis框架搭建手册

    4. **整合过程**:在Struts2中,我们可以利用Spring的依赖注入功能,将业务逻辑层(Service)的实例注入到Action类中。Ibatis的配置通常在`SqlMapConfig.xml`文件中完成,包括数据库连接信息、SQL映射等。然后,...

    Mathematica基础数学实验PPT课件.pptx

    * 约束条件:b和L为表,b={{b1,s1},{b2,s2},…},si=0, ±1时,表示第i个约束取=, ≥, ≤,L={{u1,v1},{u2,v2},…},表示决策变量xi的约束ui≤xi≤vi(ui和vi可以取-∞和+∞)。 2. 非线性规划(Non-Linear ...

Global site tag (gtag.js) - Google Analytics