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>
  • 相关阅读:
    多播(组播)与广播的技术实现
    (转)单播、多播(组播)和广播的区别
    (转)简述负载均衡&CDN技术
    当领导得学会骂下属的艺术
    CSDN首页> 云计算 孙玄:解析58同城典型技术架构及演变
    VMware网络连接 桥接、NAt、host-only模式 .
    dajian
    [Android开发常见问题-4] RunTime.exec()如何以root权限执行多条指令?
    Android获取Root权限之后的静默安装实现代码示例分析
    Android
  • 原文地址:https://www.cnblogs.com/jepson6669/p/8883606.html
Copyright © 2011-2022 走看看