| <!-- |
| 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. See accompanying LICENSE file. |
| --> |
| |
| <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" |
| xmlns:aop="http://www.springframework.org/schema/aop" |
| xmlns:cache="http://www.springframework.org/schema/cache" |
| xmlns:p="http://www.springframework.org/schema/p" |
| xsi:schemaLocation="http://www.springframework.org/schema/beans |
| http://www.springframework.org/schema/beans/spring-beans-4.3.xsd |
| http://www.springframework.org/schema/context |
| http://www.springframework.org/schema/context/spring-context-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/aop |
| http://www.springframework.org/schema/aop/spring-aop-4.3.xsd |
| http://www.springframework.org/schema/cache |
| http://www.springframework.org/schema/cache/spring-cache.xsd"> |
| |
| <description>Kylin Rest Service</description> |
| <context:annotation-config/> |
| <mvc:annotation-driven/> |
| <aop:aspectj-autoproxy/> |
| |
| <bean class="org.apache.kylin.rest.init.InitialTaskManager" /> |
| <bean class="org.apache.kylin.rest.init.InitialSparderContext" /> |
| |
| <context:component-scan base-package="org.apache.kylin.rest"/> |
| |
| <bean class="org.apache.kylin.rest.security.PasswordPlaceholderConfigurer"> |
| <property name="ignoreResourceNotFound" value="true"/> |
| </bean> |
| |
| |
| <!-- Rest service binding --> |
| <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping"/> |
| |
| <bean id="mappingJacksonHttpMessageConverter" |
| class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/> |
| <bean id="stringHttpMessageConverter" |
| class="org.springframework.http.converter.StringHttpMessageConverter"/> |
| <bean id="formHttpMessageConverter" |
| class="org.springframework.http.converter.FormHttpMessageConverter"/> |
| |
| <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"> |
| <property name="messageConverters"> |
| <list> |
| <ref bean="mappingJacksonHttpMessageConverter"/> |
| <ref bean="stringHttpMessageConverter"/> |
| <ref bean="formHttpMessageConverter"/> |
| </list> |
| </property> |
| </bean> |
| |
| <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"> |
| <property name="viewResolvers"> |
| <list> |
| <bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/> |
| <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> |
| <!-- <property name="prefix" value="/WEB-INF/jsp/"/> --> |
| <property name="suffix" value=".jsp"/> |
| </bean> |
| </list> |
| </property> |
| <property name="defaultViews"> |
| <list> |
| <bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"/> |
| </list> |
| </property> |
| </bean> |
| <!-- Rest service binding --> |
| |
| <!-- Cache Config --> |
| <cache:annotation-driven/> |
| |
| <beans profile="!testing"> |
| <bean id="ehcache" |
| class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" |
| p:configLocation="classpath:ehcache.xml" p:shared="true"/> |
| |
| <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" |
| p:cacheManager-ref="ehcache"/> |
| </beans> |
| <beans profile="testing"> |
| <bean id="ehcache" |
| class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" |
| p:configLocation="classpath:ehcache-test.xml" p:shared="true"/> |
| |
| <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" |
| p:cacheManager-ref="ehcache"/> |
| |
| <!-- |
| <bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" |
| p:configLocation="classpath:ehcache-test.xml" p:shared="true"/> |
| |
| <bean id="remoteCacheManager" class="org.apache.kylin.cache.cachemanager.MemcachedCacheManager" /> |
| <bean id="localCacheManager" class="org.apache.kylin.cache.cachemanager.InstrumentedEhCacheCacheManager" |
| p:cacheManager-ref="ehcache"/> |
| <bean id="cacheManager" class="org.apache.kylin.cache.cachemanager.RemoteLocalFailOverCacheManager" /> |
| |
| <bean id="memcachedCacheConfig" class="org.apache.kylin.cache.memcached.MemcachedCacheConfig"> |
| <property name="timeout" value="500" /> |
| <property name="hosts" value="${kylin.cache.memcached.hosts}" /> |
| </bean> |
| --> |
| </beans> |
| <beans> |
| <bean id="multipartResolver" |
| class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> |
| <property name="maxUploadSize" value="2147483648"/> |
| <property name="defaultEncoding" value="UTF-8"/> |
| <property name="resolveLazily" value="true"/> |
| </bean> |
| </beans> |
| |
| </beans> |