88 lines
4.1 KiB
XML
88 lines
4.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context"
|
|
xmlns:p="http://www.springframework.org/schema/p" xmlns:oxm="http://www.springframework.org/schema/oxm" xmlns:util="http://www.springframework.org/schema/util"
|
|
xsi:schemaLocation="
|
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
|
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
|
|
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">
|
|
|
|
<context:component-scan base-package="geoinfo,com">
|
|
<context:include-filter type="annotation" expression="org.springframework.context.annotation.Configuration" />
|
|
<context:include-filter type="annotation" expression="org.springframework.stereotype.Service" />
|
|
<context:include-filter type="annotation" expression="org.springframework.stereotype.Repository" />
|
|
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />
|
|
</context:component-scan>
|
|
|
|
<mvc:annotation-driven />
|
|
|
|
<!-- <mvc:default-servlet-handler /> -->
|
|
|
|
<!-- <mvc:interceptors> -->
|
|
<!-- <mvc:interceptor> -->
|
|
<!-- <mvc:mapping path="/**"/> -->
|
|
<!-- <bean id="loggerInterceptor" class="ictway.com.git.geoinfo.interceptor.loggerInterceptor"></bean> -->
|
|
<!-- </mvc:interceptor> -->
|
|
|
|
<!-- <mvc:interceptor> <mvc:mapping path="/**"/> <bean id="loginInterceptor" class="com.ygt.gtyoon.interceptor.LoginInterceptor"></bean> </mvc:interceptor> -->
|
|
<!-- </mvc:interceptors> -->
|
|
|
|
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" />
|
|
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver" p:order="0" />
|
|
<!-- <bean id="jsonView" class="org.springframework.web.servlet.view.json.MappingJacksonJsonView" /> -->
|
|
|
|
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
|
|
<property name="contentNegotiationManager">
|
|
<bean class="org.springframework.web.accept.ContentNegotiationManager">
|
|
<constructor-arg>
|
|
<bean class="org.springframework.web.accept.PathExtensionContentNegotiationStrategy">
|
|
<constructor-arg>
|
|
<map>
|
|
<entry key="json" value="application/json" />
|
|
<entry key="xml" value="application/xml" />
|
|
</map>
|
|
</constructor-arg>
|
|
</bean>
|
|
</constructor-arg>
|
|
</bean>
|
|
</property>
|
|
|
|
<property name="defaultViews">
|
|
<list>
|
|
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
|
|
<property name="contentType" value="application/json;charset=UTF-8" />
|
|
<property name="prefixJson" value="false" />
|
|
<property name="extractValueFromSingleKeyModel" value="true" />
|
|
<property name="modelKeys" value="jsonView" />
|
|
<property name="objectMapper">
|
|
<bean class="geoinfo.com.jackson.JacksonObjectMapper" />
|
|
</property>
|
|
</bean>
|
|
<bean class="org.springframework.web.servlet.view.xml.MarshallingView">
|
|
<constructor-arg>
|
|
<bean class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
|
|
<property name="packagesToScan">
|
|
<list>
|
|
<value>geoinfo.**.service</value>
|
|
</list>
|
|
</property>
|
|
</bean>
|
|
</constructor-arg>
|
|
</bean>
|
|
</list>
|
|
</property>
|
|
</bean>
|
|
|
|
<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" p:order="1" p:viewClass="org.springframework.web.servlet.view.JstlView" p:prefix="/WEB-INF/views/" p:suffix=".jsp">
|
|
</bean>
|
|
|
|
<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
|
|
<property name="definitions">
|
|
<list>
|
|
<value>/WEB-INF/tiles/tiles-layout.xml</value>
|
|
</list>
|
|
</property>
|
|
<property name="preparerFactoryClass" value="org.springframework.web.servlet.view.tiles3.SpringBeanPreparerFactory" />
|
|
</bean>
|
|
|
|
</beans> |