1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright 2016-2017, Nokia Corporation
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.
17 <beans xmlns="http://www.springframework.org/schema/beans"
18 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19 xmlns:context="http://www.springframework.org/schema/context"
20 xmlns:mvc="http://www.springframework.org/schema/mvc"
21 xsi:schemaLocation="http://www.springframework.org/schema/beans
22 http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
23 http://www.springframework.org/schema/mvc
24 http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
25 http://www.springframework.org/schema/context
26 http://www.springframework.org/schema/context/spring-context-4.3.xsd"
28 default-lazy-init="true">
30 <bean id="propertyConfigurer"
31 class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
32 <property name="location" value="classpath:config.properties"/>
35 <bean id="adaptorEnv" class="com.nokia.vfcadaptor.common.bo.AdaptorEnv" scope="singleton" >
36 <property name = "nslcmIp" value="${nslcmIp}" />
37 <property name = "nslcmPort" value="${nslcmPort}" />
38 <property name = "catalogIp" value="${catalogIp}" />
39 <property name = "catalogPort" value="${catalogPort}" />
40 <property name = "cbamIp" value="${cbamIp}" />
41 <property name = "grantType" value="${grant_type}" />
42 <property name = "clientId" value="${client_id}" />
43 <property name = "clientSecret" value="${client_secret}" />
46 <bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/>
48 <bean name = "httpClientBuilder" class="com.nokia.vfcadaptor.http.client.HttpClientUtils" factory-method="createHttpClientBuilder"/>
50 <context:component-scan base-package="com.nokia.vfcadaptor" />
52 <!-- 将StringHttpMessageCOnverter的默认编码设为UTF-8 -->
53 <mvc:annotation-driven>
54 <mvc:message-converters register-defaults="true">
55 <bean class="org.springframework.http.converter.StringHttpMessageConverter">
56 <constructor-arg value="UTF-8" />
58 </mvc:message-converters>
59 </mvc:annotation-driven>
61 <!-- public part end -->
63 <bean id="sessionFactory"
64 class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
65 <property name="hibernateProperties">
67 <prop key="hibernate.dialect">
68 org.hibernate.dialect.MySQLDialect
70 <prop key="hibernate.show_sql">false</prop>
71 <prop key="hibernate.jdbc.batch_size">100</prop>
72 <!--<prop key="hibernate.connection.autocommit">false</prop>-->
73 <prop key="hibernate.connection.autocommit">true</prop>
74 <prop key="hibernate.proxool.pool_alias">proxoolPool</prop>
75 <prop key="hibernate.proxool.xml">ProxoolConf.xml</prop>
76 <prop key="hibernate.connection.provider_class">org.hibernate.connection.ProxoolConnectionProvider</prop>
77 <prop key="hibernate.cache.provider_class">
78 org.hibernate.cache.HashtableCacheProvider
80 <prop key="hibernate.connection.release_mode">after_transaction</prop>
84 <!-- mappingResources属性用来列出全部映射文件 -->
85 <property name="mappingResources">
88 <value>hbm/vnfm_job_execution_map.hbm.xml</value>
93 <bean id="transactionManager"
94 class="org.springframework.orm.hibernate3.HibernateTransactionManager">
95 <property name="sessionFactory">
96 <ref local="sessionFactory" />