zoukankan      html  css  js  c++  java
  • 024-cxf.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:jaxws="http://cxf.apache.org/jaxws"
    xmlns:soap="http://cxf.apache.org/bindings/soap"
    xmlns:context="http://www.springframework.org/schema/context"
    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.xsd
                        http://cxf.apache.org/bindings/soap 
                        http://cxf.apache.org/schemas/configuration/soap.xsd
                        http://cxf.apache.org/jaxws 
                        http://cxf.apache.org/schemas/jaxws.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context.xsd
                        http://www.springframework.org/schema/aop
                        http://www.springframework.org/schema/aop/spring-aop.xsd
                        http://www.springframework.org/schema/tx 
                        http://www.springframework.org/schema/tx/spring-tx.xsd
                        ">
        <!-- 引入CXF Bean定义如下,早期的版本中使用 -->
        <import resource="classpath:META-INF/cxf/cxf.xml" />
        <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
        <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
        
        <!-- 配置数据源 -->
        <bean name="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
            <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
            <property name="url" value="jdbc:mysql:///boscrm"/>
            <property name="username" value="root"/>
            <property name="password" value="root"/>
        </bean>
        
        <!-- 事务管理器 -->
        <bean name="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
            <property name="dataSource" ref="dataSource"/>
        </bean>
        
        <!-- 支持事务注解 -->
        <tx:annotation-driven transaction-manager="transactionManager"/>
        
        <bean name="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
            <property name="dataSource" ref="dataSource"/>
        </bean>
        
        <bean name="customerService" class="com.test.service.CustomerServiceImpl">
            <property name="jdbcTemplate" ref="jdbcTemplate"/>
        </bean>
        
        <!-- 注册服务 -->
        <jaxws:server id="myService" address="/customer">
            <jaxws:serviceBean>
                <ref bean="customerService"/>
            </jaxws:serviceBean>
        </jaxws:server>
    </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:jaxws="http://cxf.apache.org/jaxws"
    xmlns:soap="http://cxf.apache.org/bindings/soap"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
                        http://www.springframework.org/schema/beans/spring-beans.xsd
                        http://cxf.apache.org/bindings/soap 
                        http://cxf.apache.org/schemas/configuration/soap.xsd
                        http://cxf.apache.org/jaxws 
                        http://cxf.apache.org/schemas/jaxws.xsd">
        <!-- 引入CXF Bean定义如下,早期的版本中使用 -->
        <import resource="classpath:META-INF/cxf/cxf.xml" />
        <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
        <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
        
    </beans>
  • 相关阅读:
    高精度、大整数幂取模
    关于正则表达式
    003.android资源文件剖析(Resources)
    myBatis 基础测试 表关联关系配置 集合 测试
    Android应用开发学习笔记之播放音频
    移植一个开源点餐网到SAE平台上
    6.0RMB MP3所看到的……
    [读书笔记]设计原本[The Design of Design]
    递归 和 非递归 遍历二叉树
    Android应用开发学习笔记之播放视频
  • 原文地址:https://www.cnblogs.com/jepson6669/p/8883606.html
Copyright © 2011-2022 走看看