`
Xgw123485
  • 浏览: 85097 次
  • 性别: 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框架整合

    一个药品注册,功能有附件上传(包括批量上传)、下载、...实现技术有三大框架(S2SI)、JS、JQuery(附件上传就是JQuery做的)、包括了一些类似权限的,非常简单,方便的配置文件,我这里用的是通配符配置的配置文件,很实用。

    搭建S2SI框架

    搭建S2SI框架的例子,具体部署步骤,以及各个组件的配置。

    S2SI框架学习

    这个是一个Struts2+spring+ibatis的一个样例,适合很多初学者搭建框架学习,里边还有一个增删查询的小例子,非常实用学习

    S2S实例源码(struts2 spring hibrnate)

    S2S实例源码(struts2 spring hibrnate) S2S实例源码(struts2 spring hibrnate) S2S实例源码(struts2 spring hibrnate)

    s2sh整合实例

    s2sh整合的完整代码,希望大家喜欢。里面包含了一些基本的有用的东西

    自学代码s2si(二)

    自学代码s2si(二)

    S2Si整合示例项目

    里面是单表的s2si框架整合架构,我希望能对大家有所帮助,如果有疑问请米 303743000

    s2si例子(jsp)

    适合新手刚开始学习的时候看看……s2si的例子项目jsp的……

    三大框架精简包(S2SH,S2SI)

    S2SH精简包、S2SI精简包,包括文件上传、下载的。都是一些实用的精简包,可以让你的项目不必要运行一些不用的包。

    S2SH整合实例

    S2SH整合实例S2SH整合实例S2SH整合实例

    正宗的s2sh登录实例

    正宗的s2sh登录实例 根据代码设置数据库表 修改连接数据库信息就可以直接执行, jar包没有冲突。 此例没有用注解,没有用通用事务管理器,这些东西很简单的。 方便需要s2sh框架的朋友

    网上朋友的s2sh实例

    网上朋友的s2sh实例,我这边拿来学习了一下,改了一些东西,然后就出错了,大家有空帮忙看下你们那有没有错误,是不是我jar包的问题。

    s2sh登录注册实例

    s2sh登录注册实例s2sh登录注册实例s2sh登录注册实例s2sh登录注册实例s2sh登录注册实例s2sh登录注册实例s2sh登录注册实例s2sh登录注册实例s2sh登录注册实例

    s2si struts2+spring+ibats框架的留言本,oracle数据库

    s2si, struts2+spring+ibats框架的留言本,oracle数据库,麻雀虽小五脏俱全。

    jquery json s2sh项目实例

    jquery json s2sh项目实例

    S2SH搭建实例

    java S2SH搭建实例 在eclipse 或者 myeclipse 里面都可以导入使用

    s2si框架代码+增删改查

    完整的框架代码,规范的代码格式。注释完整,易懂!

    S2SH上传下载实例

    这个一个S2SH做的上传下载项目,项目绝对能跑起来!!!只是一个简单的供菜鸟学习的项目!!欢迎大家加我好友!!共同研究java

    S2SI框架整合参考示例

    此为spring+ibatis+struts2整合登陆示例 用的是sql server2005只为表明如何配置3个框架 整合 导入可以用 有问题米我 303743000

    S2SH_结合_Myeclipse_第一个简单实例.ppt

    S2SH架构搭建--LoginDemo ,最简单的s2sh整合

Global site tag (gtag.js) - Google Analytics