| 1 | <?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 | <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> |
|---|
| 3 | <beans> |
|---|
| 4 | |
|---|
| 5 | <bean id="defaultConfig" class="org.geowebcache.util.PropertiesConfiguration"> |
|---|
| 6 | <constructor-arg type="org.geowebcache.cache.CacheFactory" ref="cacheFactory"/> |
|---|
| 7 | <property name="relativePath"><value>/WEB-INF/classes</value></property> |
|---|
| 8 | <!-- By default GWC will look for .properties files in the resources folder. --> |
|---|
| 9 | <!-- property name="relativePath"><value>../resources</value></property --> |
|---|
| 10 | <!-- property name="absolutePath"><value>/etc/geowebcache/conf</value></property --> |
|---|
| 11 | <!-- property name="absolutePath"><value>c:\geowebcache\conf</value></property --> |
|---|
| 12 | </bean> |
|---|
| 13 | |
|---|
| 14 | <!-- Example for automatically configuring GWC from a WMS getCapabilities document |
|---|
| 15 | Constructor arguments: |
|---|
| 16 | 1) Cache factory, bean defined below |
|---|
| 17 | 2) URL to get getCapabilities document from |
|---|
| 18 | 3) Commaseparated list of supported MIME types |
|---|
| 19 | 4) Metatiling factors |
|---|
| 20 | --> |
|---|
| 21 | <!-- |
|---|
| 22 | <bean id="wmsConfig" class="org.geowebcache.util.GetCapabilitiesConfiguration"> |
|---|
| 23 | <constructor-arg type="org.geowebcache.cache.CacheFactory" ref="cacheFactory"/> |
|---|
| 24 | <constructor-arg value="http://sigma.openplans.org:8080/geoserver/wms?request=getCapabilities"/> |
|---|
| 25 | <constructor-arg value="image/png,image/jpeg"/> |
|---|
| 26 | <constructor-arg value="3x3"/> |
|---|
| 27 | </bean> |
|---|
| 28 | --> |
|---|
| 29 | |
|---|
| 30 | <!-- For each configuration bean above, add them below to activate --> |
|---|
| 31 | <bean id="tLDispatcher" class="org.geowebcache.layer.TileLayerDispatcher"> |
|---|
| 32 | <property name="config"> |
|---|
| 33 | <list> |
|---|
| 34 | <ref bean="defaultConfig"/> |
|---|
| 35 | <!-- ref bean="wmsConfig"/ --> |
|---|
| 36 | </list> |
|---|
| 37 | </property> |
|---|
| 38 | </bean> |
|---|
| 39 | |
|---|
| 40 | <!-- For each configuration bean above, add them below to activate --> |
|---|
| 41 | <bean id="seederDispatcher" class="org.geowebcache.seeder.SeederDispatcher"> |
|---|
| 42 | <property name="allowedSeeders"> |
|---|
| 43 | <list> |
|---|
| 44 | <value>127.0.0.1</value> |
|---|
| 45 | </list> |
|---|
| 46 | </property> |
|---|
| 47 | </bean> |
|---|
| 48 | |
|---|
| 49 | <!-- controller for handling all incoming requests --> |
|---|
| 50 | <bean id="geowebcacheDispatcher" class="org.geowebcache.GeoWebCacheDispatcher"> |
|---|
| 51 | <property name="tileLayerDispatcher" ref="tLDispatcher"/> |
|---|
| 52 | <property name="seederDispatcher" ref="seederDispatcher"/> |
|---|
| 53 | <!-- property name="servletPrefix" value=""/ --> |
|---|
| 54 | </bean> |
|---|
| 55 | |
|---|
| 56 | <!-- Services, make sure you name the bean the same as the path --> |
|---|
| 57 | <bean id="serviceWMS" |
|---|
| 58 | class="org.geowebcache.service.wms.WMSService"/> |
|---|
| 59 | <bean id="serviceGMaps" |
|---|
| 60 | class="org.geowebcache.service.gmaps.GMapsConverter"/> |
|---|
| 61 | <bean id="serviceVE" |
|---|
| 62 | class="org.geowebcache.service.ve.VEConverter"/> |
|---|
| 63 | <bean id="serviceKML" |
|---|
| 64 | class="org.geowebcache.service.kml.KMLService"/> |
|---|
| 65 | |
|---|
| 66 | <!-- Caches and associated Cache Keys --> |
|---|
| 67 | <bean id="cacheJCS" class="org.geowebcache.cache.jcs.JCSCache"> |
|---|
| 68 | <property name="defaultKeyBeanId"><value>cacheKeyJCS</value></property> |
|---|
| 69 | </bean> |
|---|
| 70 | <bean id="cacheKeyJCS" class="org.geowebcache.cache.jcs.JCSKey"/> |
|---|
| 71 | |
|---|
| 72 | <bean id="cacheFile" class="org.geowebcache.cache.file.FileCache"> |
|---|
| 73 | <property name="defaultKeyBeanId"><value>cacheKeyFile</value></property> |
|---|
| 74 | </bean> |
|---|
| 75 | <bean id="cacheKeyFile" class="org.geowebcache.cache.file.FilePathKey"/> |
|---|
| 76 | |
|---|
| 77 | <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> |
|---|
| 78 | <property name="alwaysUseFullPath" value="true"/> |
|---|
| 79 | <property name="mappings"> |
|---|
| 80 | <props> |
|---|
| 81 | <prop key="/service/**">geowebcacheDispatcher</prop> |
|---|
| 82 | <prop key="/seed/**">geowebcacheDispatcher</prop> |
|---|
| 83 | </props> |
|---|
| 84 | </property> |
|---|
| 85 | </bean> |
|---|
| 86 | |
|---|
| 87 | <!-- Cache and CacheKey factories --> |
|---|
| 88 | <bean id="cacheKeyFactory" class="org.geowebcache.cache.CacheKeyFactory"/> |
|---|
| 89 | |
|---|
| 90 | <bean id="cacheFactory" class="org.geowebcache.cache.CacheFactory"> |
|---|
| 91 | <constructor-arg type="org.geowebcache.cache.CacheKeyFactory" ref="cacheKeyFactory"/> |
|---|
| 92 | <property name="defaultCacheBeanId"><value>cacheFile</value></property> |
|---|
| 93 | </bean> |
|---|
| 94 | </beans> |
|---|