Browse Source

添加缺少文件

lsl 2 years ago
parent
commit
1dc513b00a
3 changed files with 290 additions and 1 deletions
  1. 1 1
      .gitignore
  2. 160 0
      WebContent/WEB-INF/mvc-dispatcher-servlet.xml
  3. 129 0
      WebContent/WEB-INF/web.xml

+ 1 - 1
.gitignore

@@ -34,4 +34,4 @@ DPshow*.iml
 target/
 bin/
 out/
-WebContent/
+WebContent/uploadFile/

+ 160 - 0
WebContent/WEB-INF/mvc-dispatcher-servlet.xml

@@ -0,0 +1,160 @@
+<?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:p="http://www.springframework.org/schema/p"
+	   xmlns:tx="http://www.springframework.org/schema/tx"
+	   xmlns:aop="http://www.springframework.org/schema/aop"
+	   xmlns:context="http://www.springframework.org/schema/context"
+	   xmlns:task="http://www.springframework.org/schema/task"
+	   xsi:schemaLocation="http://www.springframework.org/schema/beans
+	http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
+	http://www.springframework.org/schema/context
+	http://www.springframework.org/schema/context/spring-context-4.0.xsd
+	http://www.springframework.org/schema/tx
+	http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
+	http://www.springframework.org/schema/aop
+	http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
+	http://www.springframework.org/schema/mvc
+    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">
+
+	<mvc:annotation-driven />
+	<!-- 静态资源文件访问 -->
+	<mvc:default-servlet-handler />
+
+  
+	<context:component-scan
+		base-package="cn.com.countrygarden.bi" />
+	
+
+	<aop:aspectj-autoproxy proxy-target-class="true" />
+
+	<!-- 新增 AccessTokenInterceptor 拦截检验 AccessToken -->
+	<mvc:interceptors>
+		<mvc:interceptor>
+			<mvc:mapping path="/api/**/**" />
+			<mvc:exclude-mapping path="/api/user/login" />
+			<mvc:exclude-mapping path="/api/tongyi/getTongYiUrl" />
+			<mvc:exclude-mapping path="/api/tongyi/getUserInfo" />
+			<mvc:exclude-mapping path="/api/tongyi/getLogoutUrl" />
+			<mvc:exclude-mapping
+				path="/api/reviewQuestionnaire/getreviewquestionnaireanswer" />
+			<mvc:exclude-mapping
+				path="/api/reviewScore/updataflag" />
+			<mvc:exclude-mapping path="/api/reviewScore/add" />
+			<mvc:exclude-mapping path="/api/service/datav/**" />
+			<mvc:exclude-mapping
+				path="/api/reviewQuestionnaire/getreviewquestionnaireanswer" />
+             <mvc:exclude-mapping path="/api/canteenInvestigate/bdpsndoc" />
+             
+             <mvc:exclude-mapping path="/api/canteenInvestigate/getcantequestionnaireaca" />
+             <mvc:exclude-mapping path="/api/canteenScore/bdpsndoccadati" />
+              <mvc:exclude-mapping path="/api/canteenScore/updatescore" />
+             <mvc:exclude-mapping path="/api/canteenScore/add" />
+             <mvc:exclude-mapping path="/api/reviewQuestionnaireProblemClassification/pqpclist" />
+             
+             <mvc:exclude-mapping path="/api/personnelAssessment/getreviewquestionnaireanswer" />
+             <mvc:exclude-mapping path="/api/personnelAssessment/updataflag" />
+              <mvc:exclude-mapping path="/api/personnelAssessment/addScoreAssessment" />
+			<mvc:exclude-mapping
+				path="/api/reviewScore/updataflag" />
+			<mvc:exclude-mapping path="/api/reviewScore/add" />
+			
+			<mvc:exclude-mapping path="/api/personInfo/personInfoApp" />
+			<mvc:exclude-mapping path="/api/datav/**" />
+			<mvc:exclude-mapping path="/api/invest/region/investment/app" />
+			<mvc:exclude-mapping path="/api/invest/region/investment/investmentAppInfo" />
+			<mvc:exclude-mapping path="/api/personInfo/personInfoBdid" />
+			<mvc:exclude-mapping path="/api/ckCleaner/ckexpand" />
+			<mvc:exclude-mapping path="/api/ckCleaner/allData" />
+			<mvc:exclude-mapping path="/api/ckPublicBenefits/getrevenue" />
+			<mvc:exclude-mapping path="/api/wcx/wcxInnovation/tongjizhou" />
+			<mvc:exclude-mapping path="/api/wcx/wcxInnovation/tongjiyue" />
+			<mvc:exclude-mapping path="/api/wcx/wcxInnovation/tongjiri" />
+			<mvc:exclude-mapping path="/api/wcx/ckKsh/updateConttPrrty" />
+			<mvc:exclude-mapping path="/api/wcx/ckKsh/updateadd" />
+			<mvc:exclude-mapping path="/api/wcx/ckKsh/roleadd" />
+
+			<bean
+				class="cn.com.countrygarden.bi.main.interceptor.AccessTokenInterceptor" />
+		</mvc:interceptor>
+	</mvc:interceptors>
+
+	<!-- 新增 微信公众号 拦截检验 AccessToken -->
+	<mvc:interceptors>
+		<mvc:interceptor>
+			<mvc:mapping path="/api/wxLogin/**" />
+			<mvc:exclude-mapping path="/api/wxLogin/userAuth" />
+			<mvc:exclude-mapping path="/api/wxLogin/authLogin" />
+			<mvc:exclude-mapping path="/api/wxLogin/check/phone" />
+			<mvc:exclude-mapping path="/api/wxLogin/send/message" />
+			<mvc:exclude-mapping path="/api/wxLogin/code" />
+			<bean
+					class="cn.com.countrygarden.bi.main.interceptor.TygWxInterceptor" />
+		</mvc:interceptor>
+	</mvc:interceptors>
+
+
+
+	<!-- 统一异常处理 -->
+	<!--<bean id="exceptionResolver" class="cn.com.countrygarden.bi.main.exception.WebMvcHandlerExceptionResolver"></bean> -->
+
+	<bean
+		class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+		<property name="prefix">
+			<value>/WEB-INF/view/</value>
+		</property>
+		<property name="suffix">
+			<value>.jsp</value>
+		</property>
+	</bean>
+
+	<bean
+		class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
+		<property name="order" value="1" />
+		<!--<property name="mediaTypes"> -->
+		<!--<map> -->
+		<!--<entry key="json" value="application/json"/> -->
+		<!--<entry key="xml" value="application/xml"/> -->
+		<!--</map> -->
+		<!--</property> -->
+		<property name="defaultViews">
+			<list>
+				<!-- 输出为JSON数据 -->
+				<bean
+					class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
+
+				</bean>
+			</list>
+		</property>
+	</bean>
+
+	<bean id="cacheDataTask" class="cn.com.countrygarden.bi.main.controller.manager.ManagerMapCacheDataTask">
+		<property name="managerMapUtil" ref="managerMapUtil"/>
+	</bean>
+	<task:scheduler id="testTask" pool-size="3" />
+	<task:scheduled-tasks scheduler="testTask">
+		<task:scheduled ref="cacheDataTask" method="cacheManagerMapData" cron="0 0 0 ? * WED,SUN" />
+		<task:scheduled ref="cacheDataTask" method="cacheHouseKeeperData" cron="0 0 1 ? * WED,SUN" />
+		<!--<task:scheduled ref="cacheDataTask" method="test" cron="0 0/1 * * * ?" />-->
+	</task:scheduled-tasks>
+
+	<bean id="adviseTimeOutTimer" class=" cn.com.countrygarden.bi.main.controller.advise.AdviseTimeOutTimer">
+		<property name="adviseUtil" ref="adviseUtil"/>
+	</bean>
+	<task:scheduler id="adviseTask" pool-size="3" />
+	<task:scheduled-tasks scheduler="adviseTask">
+		<task:scheduled ref="adviseTimeOutTimer" method="timeOutAdviseProcess" cron="0 0/5 * * * ? " />
+	</task:scheduled-tasks>
+
+	<bean id="sendGzhMessageTask" class="cn.com.countrygarden.bi.main.controller.experience.SendGzhMessageTask">
+	</bean>
+	<task:scheduler id="sendMessageTask" pool-size="3" />
+	<task:scheduled-tasks scheduler="adviseTask">
+		<task:scheduled ref="sendGzhMessageTask" method="sendMessage" cron="0 0/5 * * * ? " />
+	</task:scheduled-tasks>
+
+</beans>
+
+
+

+ 129 - 0
WebContent/WEB-INF/web.xml

@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+         id="WebApp_ID" version="3.0">
+    <display-name>DPshow</display-name>
+    <!-- <listener>
+      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+    <context-param>
+      <param-name>contextConfigLocation</param-name>
+      <param-value>
+              classpath:/spring/applicationContext.xml
+          </param-value>
+    </context-param>
+    <servlet>
+      <servlet-name>mvc-dispatcher</servlet-name>
+      <servlet-class>
+              org.springframework.web.servlet.DispatcherServlet
+          </servlet-class>
+      <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+      <servlet-name>mvc-dispatcher</servlet-name>
+      <url-pattern>/</url-pattern>
+    </servlet-mapping>
+      <welcome-file-list>
+          <welcome-file>index.html</welcome-file>
+          <welcome-file>index.htm</welcome-file>
+      </welcome-file-list> -->
+
+
+    <!-- Spring MVC配置 -->
+    <!-- ====================================== -->
+    <servlet>
+        <servlet-name>spring</servlet-name>
+        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+        <!-- 可以自定义servlet.xml配置文件的位置和名称,默认为WEB-INF目录下,名称为[<servlet-name>]-servlet.xml,如spring-servlet.xml-->
+        <init-param>
+            <param-name>contextConfigLocation</param-name>
+            <param-value>/WEB-INF/mvc-dispatcher-servlet.xml</param-value>
+        </init-param>
+
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>spring</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
+
+
+    <!-- Spring配置 -->
+    <!-- ====================================== -->
+    <listener>
+        <listener-class>
+            org.springframework.web.context.ContextLoaderListener
+        </listener-class>
+    </listener>
+    <listener>
+        <listener-class>cn.com.countrygarden.bi.main.listener.MySessionListener</listener-class>
+    </listener>
+
+
+    <!-- 指定Spring Bean的配置文件所在目录。默认配置在WEB-INF目录下 -->
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>classpath:/spring/applicationContext.xml</param-value>
+    </context-param>
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+        <welcome-file>index.htm</welcome-file>
+        <welcome-file>index.jsp</welcome-file>
+        <welcome-file>default.html</welcome-file>
+        <welcome-file>default.htm</welcome-file>
+        <welcome-file>default.jsp</welcome-file>
+    </welcome-file-list>
+
+    <filter>
+        <filter-name>CharacterEncodingFilter</filter-name>
+        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
+        <init-param>
+            <param-name>encoding</param-name>
+            <param-value>UTF-8</param-value>
+        </init-param>
+    </filter>
+    <filter-mapping>
+        <filter-name>CharacterEncodingFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+    <filter>
+        <filter-name>CorsFilter</filter-name>
+        <filter-class>cn.com.countrygarden.bi.main.filter.CorsFilter</filter-class>
+    </filter>
+    <filter-mapping>
+        <filter-name>CorsFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+    <!-- PUT 方法支持 -->
+    <filter>
+        <filter-name>HttpMethodFilter</filter-name>
+        <filter-class>org.springframework.web.filter.HttpPutFormContentFilter</filter-class>
+    </filter>
+    <filter-mapping>
+        <filter-name>HttpMethodFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+    <!-- 增加允许跨域的配置过滤 开始 -->
+    <!--<filter>
+        <filter-name>CorsFilter1</filter-name>
+        <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
+   </filter>
+   <filter-mapping>
+        <filter-name>CorsFilter1</filter-name>
+        <url-pattern>/*</url-pattern>
+   </filter-mapping>-->
+    <!-- 增加允许跨域的配置过滤 结束 -->
+
+    <!-- logback -->
+    <context-param>
+        <param-name>logbackConfigLocation</param-name>
+        <param-value>classpath:logback.xml</param-value>
+    </context-param>
+    <listener>
+        <listener-class>ch.qos.logback.ext.spring.web.LogbackConfigListener</listener-class>
+    </listener>
+</web-app>