applicationContext.xml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
  4. xmlns:context="http://www.springframework.org/schema/context"
  5. xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:cache="http://www.springframework.org/schema/cache"
  6. xmlns:aop="http://www.springframework.org/schema/aop"
  7. xsi:schemaLocation="
  8. http://www.springframework.org/schema/beans
  9. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  10. http://www.springframework.org/schema/context
  11. http://www.springframework.org/schema/context/spring-context-3.0.xsd
  12. http://www.springframework.org/schema/aop
  13. http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
  14. http://www.springframework.org/schema/cache
  15. http://www.springframework.org/schema/cache/spring-cache-3.1.xsd
  16. http://www.springframework.org/schema/mvc
  17. http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
  18. <context:component-scan base-package="com.chinacreator"></context:component-scan>
  19. <mvc:annotation-driven />
  20. <mvc:default-servlet-handler />
  21. <aop:aspectj-autoproxy proxy-target-class="true" />
  22. <cache:annotation-driven cache-manager="cacheManager" />
  23. <bean id="cacheManagerFactory"
  24. class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
  25. p:configLocation="classpath:ehcache.xml" p:shared="false" />
  26. <bean id="cacheManager" class="com.chinacreator.common.support.cache.EhCacheManager"
  27. p:cacheManager-ref="cacheManagerFactory" />
  28. <bean class="org.springframework.web.servlet.view.BeanNameViewResolver">
  29. <property name="order" value="1" />
  30. </bean>
  31. <bean name="json" class="org.springframework.web.servlet.view.json.JsonView">
  32. <property name="jsonWriter">
  33. <ref bean="jsonWriter" />
  34. </property>
  35. </bean>
  36. <!--
  37. <bean name="jedisCache" class="com.chinacreator.common.support.cache.JedisCache" init-method="initCache" />
  38. -->
  39. <bean name="jsonWriter"
  40. class="org.springframework.web.servlet.view.json.writer.sojo.SojoJsonStringWriter">
  41. <property name="convertAllMapValues">
  42. <value>true</value>
  43. </property>
  44. </bean>
  45. <bean class="com.chinacreator.common.support.web.handler.ExceptionResolver" />
  46. </beans>