1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 2016-2017, Huawei Technologies Co., Ltd.
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
18 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19 xmlns:osgi="http://www.springframework.org/schema/osgi"
20 xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
21 xmlns:ctx="http://www.springframework.org/schema/context"
22 xmlns:jaxrs="http://cxf.apache.org/jaxrs"
23 xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
25 http://www.springframework.org/schema/beans
26 http://www.springframework.org/schema/beans/spring-beans.xsd
27 http://www.springframework.org/schema/osgi
28 http://www.springframework.org/schema/osgi/spring-osgi.xsd
29 http://www.springframework.org/schema/context
30 http://www.springframework.org/schema/context/spring-context.xsd
31 http://www.springframework.org/schema/osgi-compendium
32 http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
33 http://cxf.apache.org/jaxrs
34 http://cxf.apache.org/schemas/jaxrs.xsd
35 http://cxf.apache.org/transports/http/configuration
36 http://cxf.apache.org/schemas/configuration/http-conf.xsd
37 http://www.springframework.org/schema/aop
38 http://www.springframework.org/schema/aop/spring-aop.xsd ">
40 <!-- these are included in the dependency jar -->
41 <import resource="classpath:META-INF/cxf/cxf.xml"/>
42 <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
44 <ctx:property-placeholder location="classpath:config.properties" ignore-unresolvable="true"/>
46 <bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
48 <bean id="source" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
49 <!-- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
50 <property name="url" value="jdbc:mysql://localhost:3306/vnfmdb"/>
51 Change mysql-connector to mariadb -->
52 <property name="driverClassName" value="org.mariadb.jdbc.Driver"/>
53 <property name="url" value="jdbc:mariadb://localhost:3306/vnfmdb"/>
54 <property name="username" value="root"/>
55 <property name="password" value="rootpass"/>
58 <bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
59 <property name="dataSource" ref="source"/>
60 <property name="mapperLocations" value="classpath*:mybatis/mysql/*.xml"/>
61 <!-- <property name="configLocation" value="classpath:mybatis-config.xml" /> -->
64 <bean id="session" class="org.mybatis.spring.SqlSessionTemplate">
65 <constructor-arg index="0" ref="sessionFactory"/>
69 <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
70 <property name="dataSource" ref="source"/>
74 class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.dao.impl.VnfmDaoImpl">
75 <property name="session" ref="session"></property>
78 <bean id="vnfMgr" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.VnfMgr">
79 <property name="vnfmDao" ref="vnfmDao"></property>
80 <property name="configedVduType" value="${vnf.scaleout.config.vdutype}"></property>
83 <bean id="VnfRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.VnfRoa">
84 <property name="vnfMgr" ref="vnfMgr"></property>
87 <bean id="vnfResourceMgr"
88 class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.VnfResourceMgr">
91 <bean id="VnfResourceRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.VnfResourceRoa">
92 <property name="vnfResourceMgr" ref="vnfResourceMgr"></property>
95 <bean id="authMgr" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.AuthMgr"/>
97 <bean id="AuthRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.AuthRoa">
98 <property name="authMgr" ref="authMgr"></property>
101 <bean id="VnfAdaResRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.VnfAdapterResourceRoa">
104 <bean id="SwaggerRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.SwaggerRoa"></bean>
106 <!-- bean id="registerMgr" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.RegisterMgr"
107 init-method="register" destroy-method="unRegister">
110 <jaxrs:server id="restContainer" address="/">
112 <ref bean="AuthRoa"/>
113 <ref bean="VnfResourceRoa"/>
115 <ref bean="VnfAdaResRoa"/>
116 <ref bean="SwaggerRoa"/>
117 </jaxrs:serviceBeans>
119 <ref bean="jsonProvider"/>
120 <bean class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.exceptionmapper.ServiceExceptionMapper"/>
121 <bean class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.exceptionmapper.GenericExceptionMapper"/>