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" xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
20 xmlns:ctx="http://www.springframework.org/schema/context"
21 xmlns:jaxrs="http://cxf.apache.org/jaxrs"
22 xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
24 http://www.springframework.org/schema/beans
25 http://www.springframework.org/schema/beans/spring-beans.xsd
26 http://www.springframework.org/schema/osgi
27 http://www.springframework.org/schema/osgi/spring-osgi.xsd
28 http://www.springframework.org/schema/context
29 http://www.springframework.org/schema/context/spring-context.xsd
30 http://www.springframework.org/schema/osgi-compendium
31 http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
32 http://cxf.apache.org/jaxrs
33 http://cxf.apache.org/schemas/jaxrs.xsd
34 http://cxf.apache.org/transports/http/configuration
35 http://cxf.apache.org/schemas/configuration/http-conf.xsd
36 http://www.springframework.org/schema/aop
37 http://www.springframework.org/schema/aop/spring-aop-3.0.xsd ">
39 <!-- these are included in the dependency jar -->
40 <import resource="classpath:META-INF/cxf/cxf.xml" />
41 <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
43 <bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider" />
45 <bean id="source" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
46 <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
47 <property name="url" value="jdbc:mysql://localhost:3306/vnfmdb" />
48 <property name="username" value="root"/>
49 <property name="password" value="rootpass"/>
52 <bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
53 <property name="dataSource" ref="source" />
54 <property name="mapperLocations" value="classpath*:mybatis/mysql/*.xml" />
55 <!-- <property name="configLocation" value="classpath:mybatis-config.xml" /> -->
58 <bean id="session" class="org.mybatis.spring.SqlSessionTemplate">
59 <constructor-arg index="0" ref="sessionFactory" />
63 <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
64 <property name="dataSource" ref="source" />
68 class="org.openo.nfvo.vnfmadapter.service.dao.impl.VnfmDaoImpl">
69 <property name="session" ref="session"></property>
72 <bean id="vnfMgr" class="org.openo.nfvo.vnfmadapter.service.process.VnfMgr">
73 <property name="vnfmDao" ref="vnfmDao"></property>
76 <bean id="VnfRoa" class="org.openo.nfvo.vnfmadapter.service.rest.VnfRoa">
77 <property name="vnfMgr" ref="vnfMgr"></property>
80 <bean id="vnfResourceMgr"
81 class="org.openo.nfvo.vnfmadapter.service.process.VnfResourceMgr">
84 <bean id="VnfResourceRoa" class="org.openo.nfvo.vnfmadapter.service.rest.VnfResourceRoa">
85 <property name="vnfResourceMgr" ref="vnfResourceMgr"></property>
88 <bean id="authMgr" class="org.openo.nfvo.vnfmadapter.service.process.AuthMgr" />
90 <bean id="AuthRoa" class="org.openo.nfvo.vnfmadapter.service.rest.AuthRoa">
91 <property name="authMgr" ref="authMgr"></property>
94 <bean id="VnfAdaResRoa" class="org.openo.nfvo.vnfmadapter.service.rest.VnfAdapterResourceRoa">
97 <bean id="SwaggerRoa" class="org.openo.nfvo.vnfmadapter.service.rest.SwaggerRoa"></bean>
99 <!-- bean id="registerMgr" class="org.openo.nfvo.vnfmadapter.service.process.RegisterMgr"
100 init-method="register" destroy-method="unRegister">
103 <jaxrs:server id="restContainer" address="/">
105 <ref bean="AuthRoa" />
106 <ref bean="VnfResourceRoa" />
107 <ref bean="VnfRoa" />
108 <ref bean="VnfAdaResRoa" />
109 <ref bean="SwaggerRoa" />
110 </jaxrs:serviceBeans>
112 <ref bean="jsonProvider" />
113 <bean class="org.openo.nfvo.vnfmadapter.service.rest.exceptionmapper.ServiceExceptionMapper" />
114 <bean class="org.openo.nfvo.vnfmadapter.service.rest.exceptionmapper.GenericExceptionMapper" />