aboutsummaryrefslogtreecommitdiffstats
path: root/servicegateway/service/src/main/resources/spring/service.xml
blob: 39e5ea7f71dbb272c9761d2a744aee255feda5b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2016 Huawei Technologies Co., Ltd.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
 
      http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:ctx="http://www.springframework.org/schema/context" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:oms="http://www.huawei.com/schema/oms"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context.xsd
    http://www.huawei.com/schema/oms
    http://www.huawei.com/schema/oms/oms.xsd
    http://cxf.apache.org/jaxrs 
    http://cxf.apache.org/schemas/jaxrs.xsd">
    <!-- these are included in the dependency jar -->
    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

    <!-- jar rest server registration -->
    <jaxrs:server id="sampleServer" address="/">    
        <!-- registering beans -->
        <jaxrs:serviceBeans>
            <ref bean="serviceGatewayRoaModuleImpl"></ref>            
        </jaxrs:serviceBeans>
        <!-- registering providers -->
        <jaxrs:providers>
            <bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider" />
        </jaxrs:providers>
    </jaxrs:server>
    
    <bean id="datasource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
        <property name="driverClass" value="com.mysql.jdbc.Driver" />
        <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/mybatistest" />
        <property name="user" value="root" />
        <property name="password" value="Test_12345" />
    </bean>
    
    <bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="datasource" />
        <property name="mapperLocations" value="classpath*:mybatis/mappers/*.xml" />
    </bean>
    
    <bean id="session" class="org.mybatis.spring.SqlSessionTemplate">
        <constructor-arg index="0" ref="sessionFactory" />
    </bean>

    <bean class="org.openo.gso.gui.servicegateway.activator.Activator"></bean>
    
    <bean id="Activator" class="org.openo.gso.gui.servicegateway.activator.Activator" init-method="start" destroy-method="stop">
    </bean>
    
    <bean id="serviceGatewayRoaModuleImpl" class="org.openo.gso.gui.servicegateway.roa.impl.ServiceGatewayRoaModuleImpl">
        <property name="serviceGateway" ref="serviceGateway"></property>
    </bean>    
	
	<bean id="serviceGateway" class="org.openo.gso.gui.servicegateway.service.impl.ServiceGatewayImpl">        
    </bean>  
</beans>