blob: f71aa51a5f31921287a8884157a33404999f8973 (
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2016-2017, 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:osgi="http://www.springframework.org/schema/osgi"
xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
xmlns:ctx="http://www.springframework.org/schema/context"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/osgi-compendium
http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
http://cxf.apache.org/jaxrs
http://cxf.apache.org/schemas/jaxrs.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.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"/>
<context:property-placeholder location="classpath:jdbc.properties" ignore-unresolvable="true"/>
<bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
<bean id="source" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<!-- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/vnfmdb"/>
Change mysql-connector to mariadb -->
<property name="driverClassName" value="org.mariadb.jdbc.Driver"/>
<property name="url" value="jdbc:mariadb://localhost:3306/vnfmdb"/>
<property name="username" value="root"/>
<property name="password" value="rootpass"/>
</bean>
<bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="source"/>
<property name="mapperLocations" value="classpath*:mybatis/mysql/*.xml"/>
<!-- <property name="configLocation" value="classpath:mybatis-config.xml" /> -->
</bean>
<bean id="session" class="org.mybatis.spring.SqlSessionTemplate">
<constructor-arg index="0" ref="sessionFactory"/>
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="source"/>
</bean>
<bean id="vnfmDao"
class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.dao.impl.VnfmDaoImpl">
<property name="session" ref="session"></property>
</bean>
<bean id="vnfMgr" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.VnfMgr">
<property name="vnfmDao" ref="vnfmDao"></property>
<property name="configedVduType" value="${vnf.scaleout.config.vdutype}"></property>
</bean>
<bean id="VnfRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.VnfRoa">
<property name="vnfMgr" ref="vnfMgr"></property>
</bean>
<bean id="vnfResourceMgr"
class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.VnfResourceMgr">
</bean>
<bean id="VnfResourceRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.VnfResourceRoa">
<property name="vnfResourceMgr" ref="vnfResourceMgr"></property>
</bean>
<bean id="authMgr" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.AuthMgr"/>
<bean id="AuthRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.AuthRoa">
<property name="authMgr" ref="authMgr"></property>
</bean>
<bean id="VnfAdaResRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.VnfAdapterResourceRoa">
</bean>
<bean id="SwaggerRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.SwaggerRoa"></bean>
<!-- bean id="registerMgr" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.RegisterMgr"
init-method="register" destroy-method="unRegister">
</bean-->
<jaxrs:server id="restContainer" address="/">
<jaxrs:serviceBeans>
<ref bean="AuthRoa"/>
<ref bean="VnfResourceRoa"/>
<ref bean="VnfRoa"/>
<ref bean="VnfAdaResRoa"/>
<ref bean="SwaggerRoa"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jsonProvider"/>
<bean class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.exceptionmapper.ServiceExceptionMapper"/>
<bean class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.exceptionmapper.GenericExceptionMapper"/>
</jaxrs:providers>
</jaxrs:server>
</beans>
|