diff options
Diffstat (limited to 'nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF')
3 files changed, 218 insertions, 0 deletions
diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/applicationContext-hibernate.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/applicationContext-hibernate.xml new file mode 100644 index 00000000..08a34c58 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/applicationContext-hibernate.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" +"http://www.springframework.org/dtd/spring-beans.dtd"> +<beans> + + <bean id="sessionFactory" + class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> + <property name="hibernateProperties"> + <props> + <prop key="hibernate.dialect"> + org.hibernate.dialect.MySQLDialect + </prop> + <prop key="hibernate.show_sql">false</prop> + <prop key="hibernate.jdbc.batch_size">100</prop> + <!--<prop key="hibernate.connection.autocommit">false</prop>--> + <prop key="hibernate.connection.autocommit">true</prop> + <prop key="hibernate.proxool.pool_alias">proxoolPool</prop> + <prop key="hibernate.proxool.xml">ProxoolConf.xml</prop> + <prop key="hibernate.connection.provider_class">org.hibernate.connection.ProxoolConnectionProvider</prop> + <prop key="hibernate.cache.provider_class"> + org.hibernate.cache.HashtableCacheProvider + </prop> + <prop key="hibernate.connection.release_mode">after_transaction</prop> + </props> + </property> + + <!-- mappingResources属性用来列出全部映射文件 --> + <property name="mappingResources"> + <list> + <!-- 配置所有PO映射文件 --> + <value>hbm/vnfm_job_execution_map.hbm.xml</value> + </list> + </property> + </bean> + <!-- 事务管理器 --> + <bean id="transactionManager" + class="org.springframework.orm.hibernate4.HibernateTransactionManager"> + <property name="sessionFactory"> + <ref local="sessionFactory" /> + </property> + </bean> + +</beans>
\ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/mvc-servlet.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/mvc-servlet.xml new file mode 100644 index 00000000..f26ce071 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/mvc-servlet.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2016-2017, Nokia Corporation + + 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:context="http://www.springframework.org/schema/context" + xmlns:mvc="http://www.springframework.org/schema/mvc" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-4.3.xsd + http://www.springframework.org/schema/mvc + http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd + http://www.springframework.org/schema/context + http://www.springframework.org/schema/context/spring-context-4.3.xsd" + + default-lazy-init="true"> + + <bean id="propertyConfigurer" + class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="location" value="classpath:config.properties"/> + </bean> + + <bean id="adaptorEnv" class="com.nokia.vfcadaptor.common.bo.AdaptorEnv" scope="singleton" > + <property name = "nslcmIp" value="${nslcmIp}" /> + <property name = "nslcmPort" value="${nslcmPort}" /> + <property name = "catalogIp" value="${catalogIp}" /> + <property name = "catalogPort" value="${catalogPort}" /> + <property name = "cbamIp" value="${cbamIp}" /> + <property name = "grantType" value="${grant_type}" /> + <property name = "clientId" value="${client_id}" /> + <property name = "clientSecret" value="${client_secret}" /> + </bean> + + <bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/> + + <bean name = "httpClientBuilder" class="com.nokia.vfcadaptor.http.client.HttpClientUtils" factory-method="createHttpClientBuilder"/> + + <context:component-scan base-package="com.nokia.vfcadaptor" /> + + <!-- 将StringHttpMessageCOnverter的默认编码设为UTF-8 --> + <mvc:annotation-driven> + <mvc:message-converters register-defaults="true"> + <bean class="org.springframework.http.converter.StringHttpMessageConverter"> + <constructor-arg value="UTF-8" /> + </bean> + </mvc:message-converters> + </mvc:annotation-driven> + + <!-- public part end --> + + <bean id="sessionFactory" + class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> + <property name="hibernateProperties"> + <props> + <prop key="hibernate.dialect"> + org.hibernate.dialect.MySQLDialect + </prop> + <prop key="hibernate.show_sql">false</prop> + <prop key="hibernate.jdbc.batch_size">100</prop> + <!--<prop key="hibernate.connection.autocommit">false</prop>--> + <prop key="hibernate.connection.autocommit">true</prop> + <prop key="hibernate.proxool.pool_alias">proxoolPool</prop> + <prop key="hibernate.proxool.xml">ProxoolConf.xml</prop> + <prop key="hibernate.connection.provider_class">org.hibernate.connection.ProxoolConnectionProvider</prop> + <prop key="hibernate.cache.provider_class"> + org.hibernate.cache.HashtableCacheProvider + </prop> + <prop key="hibernate.connection.release_mode">after_transaction</prop> + </props> + </property> + + <!-- mappingResources属性用来列出全部映射文件 --> + <property name="mappingResources"> + <list> + <!-- 配置所有PO映射文件 --> + <value>hbm/vnfm_job_execution_map.hbm.xml</value> + </list> + </property> + </bean> + <!-- 事务管理器 --> + <bean id="transactionManager" + class="org.springframework.orm.hibernate3.HibernateTransactionManager"> + <property name="sessionFactory"> + <ref local="sessionFactory" /> + </property> + </bean> + +</beans> diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/web.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000..124ec37e --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Copyright 2016-2017, Nokia Corporation + + 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. + --> +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://java.sun.com/xml/ns/javaee" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" + version="3.0"> + <display-name>vfcadaptor</display-name> + + <filter> + <filter-name>CharacterEncoding</filter-name> + <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> + <init-param> + <param-name>encoding</param-name> + <param-value>UTF-8</param-value> + </init-param> + <init-param> + <param-name>forceEncoding</param-name> + <param-value>true</param-value> + </init-param> + </filter> + + <filter-mapping> + <filter-name>CharacterEncoding</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + <!-- 设置servlet编码结束 --> +<!-- + <context-param> + <param-name>contextConfigLocation</param-name> + <param-value> + classpath:WEB-INF/applicationContext-hibernate.xml + </param-value> + </context-param> +--> + <servlet> + <servlet-name>springservlet</servlet-name> + <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> + <init-param> + <param-name>contextConfigLocation</param-name> + <param-value>/WEB-INF/mvc-servlet.xml</param-value> + </init-param> + <load-on-startup>1</load-on-startup> + </servlet> + <servlet-mapping> + <servlet-name>springservlet</servlet-name> + <url-pattern>/</url-pattern> + </servlet-mapping> + + <session-config> + <session-timeout>60</session-timeout> + </session-config> + + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + <welcome-file>default.html</welcome-file> + <welcome-file>default.htm</welcome-file> + <welcome-file>default.jsp</welcome-file> + </welcome-file-list> +</web-app>
\ No newline at end of file |