mvc-dispatcher-servlet.xml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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"
  4. xmlns:mvc="http://www.springframework.org/schema/mvc"
  5. xmlns:p="http://www.springframework.org/schema/p"
  6. xmlns:tx="http://www.springframework.org/schema/tx"
  7. xmlns:aop="http://www.springframework.org/schema/aop"
  8. xmlns:context="http://www.springframework.org/schema/context"
  9. xmlns:task="http://www.springframework.org/schema/task"
  10. xsi:schemaLocation="http://www.springframework.org/schema/beans
  11. http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
  12. http://www.springframework.org/schema/context
  13. http://www.springframework.org/schema/context/spring-context-4.0.xsd
  14. http://www.springframework.org/schema/tx
  15. http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
  16. http://www.springframework.org/schema/aop
  17. http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
  18. http://www.springframework.org/schema/mvc
  19. http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd">
  20. <mvc:annotation-driven />
  21. <!-- 静态资源文件访问 -->
  22. <mvc:default-servlet-handler />
  23. <context:component-scan
  24. base-package="cn.com.countrygarden.bi" />
  25. <aop:aspectj-autoproxy proxy-target-class="true" />
  26. <!-- 新增 AccessTokenInterceptor 拦截检验 AccessToken -->
  27. <mvc:interceptors>
  28. <mvc:interceptor>
  29. <mvc:mapping path="/api/**/**" />
  30. <mvc:exclude-mapping path="/api/user/login" />
  31. <mvc:exclude-mapping path="/api/tongyi/getTongYiUrl" />
  32. <mvc:exclude-mapping path="/api/tongyi/getUserInfo" />
  33. <mvc:exclude-mapping path="/api/tongyi/getLogoutUrl" />
  34. <mvc:exclude-mapping
  35. path="/api/reviewQuestionnaire/getreviewquestionnaireanswer" />
  36. <mvc:exclude-mapping
  37. path="/api/reviewScore/updataflag" />
  38. <mvc:exclude-mapping path="/api/reviewScore/add" />
  39. <mvc:exclude-mapping path="/api/service/datav/**" />
  40. <mvc:exclude-mapping
  41. path="/api/reviewQuestionnaire/getreviewquestionnaireanswer" />
  42. <mvc:exclude-mapping path="/api/canteenInvestigate/bdpsndoc" />
  43. <mvc:exclude-mapping path="/api/canteenInvestigate/getcantequestionnaireaca" />
  44. <mvc:exclude-mapping path="/api/canteenScore/bdpsndoccadati" />
  45. <mvc:exclude-mapping path="/api/canteenScore/updatescore" />
  46. <mvc:exclude-mapping path="/api/canteenScore/add" />
  47. <mvc:exclude-mapping path="/api/reviewQuestionnaireProblemClassification/pqpclist" />
  48. <mvc:exclude-mapping path="/api/personnelAssessment/getreviewquestionnaireanswer" />
  49. <mvc:exclude-mapping path="/api/personnelAssessment/updataflag" />
  50. <mvc:exclude-mapping path="/api/personnelAssessment/addScoreAssessment" />
  51. <mvc:exclude-mapping
  52. path="/api/reviewScore/updataflag" />
  53. <mvc:exclude-mapping path="/api/reviewScore/add" />
  54. <mvc:exclude-mapping path="/api/personInfo/personInfoApp" />
  55. <mvc:exclude-mapping path="/api/datav/**" />
  56. <mvc:exclude-mapping path="/api/invest/region/investment/app" />
  57. <mvc:exclude-mapping path="/api/invest/region/investment/investmentAppInfo" />
  58. <mvc:exclude-mapping path="/api/personInfo/personInfoBdid" />
  59. <mvc:exclude-mapping path="/api/ckCleaner/ckexpand" />
  60. <mvc:exclude-mapping path="/api/ckCleaner/allData" />
  61. <mvc:exclude-mapping path="/api/ckPublicBenefits/getrevenue" />
  62. <mvc:exclude-mapping path="/api/wcx/wcxInnovation/tongjizhou" />
  63. <mvc:exclude-mapping path="/api/wcx/wcxInnovation/tongjiyue" />
  64. <mvc:exclude-mapping path="/api/wcx/wcxInnovation/tongjiri" />
  65. <mvc:exclude-mapping path="/api/wcx/ckKsh/updateConttPrrty" />
  66. <mvc:exclude-mapping path="/api/wcx/ckKsh/updateadd" />
  67. <mvc:exclude-mapping path="/api/wcx/ckKsh/roleadd" />
  68. <bean
  69. class="cn.com.countrygarden.bi.main.interceptor.AccessTokenInterceptor" />
  70. </mvc:interceptor>
  71. </mvc:interceptors>
  72. <!-- 新增 微信公众号 拦截检验 AccessToken -->
  73. <mvc:interceptors>
  74. <mvc:interceptor>
  75. <mvc:mapping path="/api/wxLogin/**" />
  76. <mvc:exclude-mapping path="/api/wxLogin/userAuth" />
  77. <mvc:exclude-mapping path="/api/wxLogin/authLogin" />
  78. <mvc:exclude-mapping path="/api/wxLogin/check/phone" />
  79. <mvc:exclude-mapping path="/api/wxLogin/send/message" />
  80. <mvc:exclude-mapping path="/api/wxLogin/code" />
  81. <bean
  82. class="cn.com.countrygarden.bi.main.interceptor.TygWxInterceptor" />
  83. </mvc:interceptor>
  84. </mvc:interceptors>
  85. <!-- 统一异常处理 -->
  86. <!--<bean id="exceptionResolver" class="cn.com.countrygarden.bi.main.exception.WebMvcHandlerExceptionResolver"></bean> -->
  87. <bean
  88. class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  89. <property name="prefix">
  90. <value>/WEB-INF/view/</value>
  91. </property>
  92. <property name="suffix">
  93. <value>.jsp</value>
  94. </property>
  95. </bean>
  96. <bean
  97. class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
  98. <property name="order" value="1" />
  99. <!--<property name="mediaTypes"> -->
  100. <!--<map> -->
  101. <!--<entry key="json" value="application/json"/> -->
  102. <!--<entry key="xml" value="application/xml"/> -->
  103. <!--</map> -->
  104. <!--</property> -->
  105. <property name="defaultViews">
  106. <list>
  107. <!-- 输出为JSON数据 -->
  108. <bean
  109. class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
  110. </bean>
  111. </list>
  112. </property>
  113. </bean>
  114. <bean id="cacheDataTask" class="cn.com.countrygarden.bi.main.controller.manager.ManagerMapCacheDataTask">
  115. <property name="managerMapUtil" ref="managerMapUtil"/>
  116. </bean>
  117. <task:scheduler id="testTask" pool-size="3" />
  118. <task:scheduled-tasks scheduler="testTask">
  119. <task:scheduled ref="cacheDataTask" method="cacheManagerMapData" cron="0 0 0 ? * WED,SUN" />
  120. <task:scheduled ref="cacheDataTask" method="cacheHouseKeeperData" cron="0 0 1 ? * WED,SUN" />
  121. <!--<task:scheduled ref="cacheDataTask" method="test" cron="0 0/1 * * * ?" />-->
  122. </task:scheduled-tasks>
  123. <bean id="adviseTimeOutTimer" class=" cn.com.countrygarden.bi.main.controller.advise.AdviseTimeOutTimer">
  124. <property name="adviseUtil" ref="adviseUtil"/>
  125. </bean>
  126. <task:scheduler id="adviseTask" pool-size="3" />
  127. <task:scheduled-tasks scheduler="adviseTask">
  128. <task:scheduled ref="adviseTimeOutTimer" method="timeOutAdviseProcess" cron="0 0/5 * * * ? " />
  129. </task:scheduled-tasks>
  130. <bean id="sendGzhMessageTask" class="cn.com.countrygarden.bi.main.controller.experience.SendGzhMessageTask">
  131. </bean>
  132. <task:scheduler id="sendMessageTask" pool-size="3" />
  133. <task:scheduled-tasks scheduler="adviseTask">
  134. <task:scheduled ref="sendGzhMessageTask" method="sendMessage" cron="0 0/5 * * * ? " />
  135. </task:scheduled-tasks>
  136. </beans>