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>
  • 相关阅读:
    HDU-4514 湫湫系列故事——设计风景线 手动扩栈
    HDU-4511 小明系列故事——女友的考验 floyd变种-标号递增最短路
    Codeforces Round #199 (Div. 2)
    HDU-4507 吉哥系列故事——恨7不成妻 数位DP
    ZOJ-2342 Roads 二分图最小权值覆盖
    C++题目一道: 重载`->': 您真的懂成员访问运算符的重载吗?
    FCEUX金手指加强版
    原码,反码与补码之间的转换简记
    stm32开发
    Windows中"打开方式..."无法指定程序的解决办法
  • 原文地址:https://www.cnblogs.com/jepson6669/p/8883606.html
Copyright © 2011-2022 走看看