spring-logic.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:tx="http://www.springframework.org/schema/tx"
  4. xmlns:cache="http://www.springframework.org/schema/cache"
  5. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  6. xmlns:context="http://www.springframework.org/schema/context"
  7. xmlns:aop="http://www.springframework.org/schema/aop"
  8. xmlns:mvc="http://www.springframework.org/schema/mvc"
  9. xsi:schemaLocation="http://www.springframework.org/schema/beans
  10. http://www.springframework.org/schema/beans/spring-beans.xsd
  11. http://www.springframework.org/schema/context
  12. http://www.springframework.org/schema/context/spring-context.xsd
  13. http://www.springframework.org/schema/aop
  14. http://www.springframework.org/schema/aop/spring-aop.xsd
  15. http://www.springframework.org/schema/tx
  16. http://www.springframework.org/schema/tx/spring-tx.xsd
  17. http://www.springframework.org/schema/cache
  18. http://www.springframework.org/schema/cache/spring-cache.xsd
  19. http://www.springframework.org/schema/mvc
  20. http://www.springframework.org/schema/mvc/spring-mvc.xsd">
  21. <context:annotation-config />
  22. <context:component-scan base-package="com.sp.bore.logic"></context:component-scan>
  23. <mvc:default-servlet-handler />
  24. <mvc:resources mapping="/file/**" location="file:${upload.fileRoot}" />
  25. <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" >
  26. <property name="providerClass" value="org.hibernate.validator.HibernateValidator" />
  27. </bean>
  28. <mvc:annotation-driven enable-matrix-variables="true" conversion-service="conversionService" validator="validator">
  29. <mvc:argument-resolvers>
  30. <bean class="com.sp.core.auth.spring.resolver.CurrentUserMethodArgumentResolver"/>
  31. <bean class="com.sp.core.auth.spring.resolver.CurrentUserAgentMethodArgumentResolver"/>
  32. </mvc:argument-resolvers>
  33. </mvc:annotation-driven>
  34. <bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean">
  35. <property name="converters">
  36. <set>
  37. <bean class="com.sp.plugin.param.ienum.EnumConverterFactory">
  38. <property name="basePackage" value="com.sp" />
  39. </bean>
  40. </set>
  41. </property>
  42. </bean>
  43. <aop:aspectj-autoproxy proxy-target-class="true" />
  44. <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
  45. <property name="defaultEncoding" value="UTF-8" />
  46. <property name="maxUploadSize" value="5242880" />
  47. </bean>
  48. <mvc:interceptors>
  49. <mvc:interceptor>
  50. <mvc:mapping path="/**" />
  51. <mvc:exclude-mapping path="/brl/**"/>
  52. <mvc:exclude-mapping path="/favicon.ico"/>
  53. <mvc:exclude-mapping path="/apidoc/**"/>
  54. <mvc:exclude-mapping path="/v2/api-docs"/>
  55. <mvc:exclude-mapping path="/file/**"/>
  56. <mvc:exclude-mapping path="/bore/upload/**"/>
  57. <mvc:exclude-mapping path="/bore/order/**"/>
  58. <mvc:exclude-mapping path="/weimob/**"/>
  59. <mvc:exclude-mapping path="/outter/**"/>
  60. <mvc:exclude-mapping path="/h5/**"/>
  61. <mvc:exclude-mapping path="/api/**"/>
  62. <mvc:exclude-mapping path="/MP_**"/>
  63. <bean class="com.sp.core.spring.interceptor.SignatureInterceptor">
  64. <property name="signName" value="${signature.signName}" />
  65. <property name="timestampName" value="${signature.timestampName}" />
  66. <property name="signKey" value="${signature.signKey}" />
  67. </bean>
  68. </mvc:interceptor>
  69. <mvc:interceptor>
  70. <mvc:mapping path="/**"/>
  71. <mvc:exclude-mapping path="/brl/**"/>
  72. <mvc:exclude-mapping path="/favicon.ico"/>
  73. <mvc:exclude-mapping path="/apidoc/**"/>
  74. <mvc:exclude-mapping path="/v2/api-docs"/>
  75. <mvc:exclude-mapping path="/file/**"/>
  76. <mvc:exclude-mapping path="/bore/order/**"/>
  77. <mvc:exclude-mapping path="/weimob/**"/>
  78. <mvc:exclude-mapping path="/outter/**"/>
  79. <mvc:exclude-mapping path="/api/**"/>
  80. <mvc:exclude-mapping path="/MP_**"/>
  81. <bean class="com.sp.core.auth.spring.interceptor.AuthInterceptor" />
  82. </mvc:interceptor>
  83. </mvc:interceptors>
  84. <bean class="com.sp.core.spring.interceptor.ExceptionHandler" />
  85. <bean id="tokenManager" class="com.sp.core.auth.MemTokenManager" />
  86. <import resource="classpath:spring-core.xml"/>
  87. </beans>