Commit 845783f51ab167985af9ff75646966a2753ccca8
1 parent
781082a419
Exists in
master
and in
6 other branches
文件恢复
Showing 1 changed file with 134 additions and 0 deletions
platform-operate-api/src/main/webapp/WEB-INF/web.xml
View file @
845783f
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor | |
| 3 | + license agreements. See the NOTICE file distributed with this work for additional | |
| 4 | + information regarding copyright ownership. The ASF licenses this file to | |
| 5 | + you under the Apache License, Version 2.0 (the "License"); you may not use | |
| 6 | + this file except in compliance with the License. You may obtain a copy of | |
| 7 | + the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required | |
| 8 | + by applicable law or agreed to in writing, software distributed under the | |
| 9 | + License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS | |
| 10 | + OF ANY KIND, either express or implied. See the License for the specific | |
| 11 | + language governing permissions and limitations under the License. --> | |
| 12 | +<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 13 | + version="2.5" | |
| 14 | + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> | |
| 15 | + <!--start跨域开始--> | |
| 16 | +<!-- | |
| 17 | + <filter> | |
| 18 | + <filter-name>CorsFilter</filter-name> | |
| 19 | + <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> | |
| 20 | + <init-param> | |
| 21 | + <param-name>cors.allowed.origins</param-name> | |
| 22 | + <param-value>*</param-value> | |
| 23 | + </init-param> | |
| 24 | + <init-param> | |
| 25 | + <param-name>cors.allowed.methods</param-name> | |
| 26 | + <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value> | |
| 27 | + </init-param> | |
| 28 | + <init-param> | |
| 29 | + <param-name>cors.allowed.headers</param-name> | |
| 30 | + <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers,authorization</param-value> | |
| 31 | + </init-param> | |
| 32 | + <init-param> | |
| 33 | + <param-name>cors.exposed.headers</param-name> | |
| 34 | + <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value> | |
| 35 | + </init-param> | |
| 36 | + <init-param> | |
| 37 | + <param-name>cors.support.credentials</param-name> | |
| 38 | + <param-value>true</param-value> | |
| 39 | + </init-param> | |
| 40 | + <init-param> | |
| 41 | + <param-name>cors.preflight.maxage</param-name> | |
| 42 | + <param-value>10</param-value> | |
| 43 | + </init-param> | |
| 44 | + </filter> | |
| 45 | + <filter-mapping> | |
| 46 | + <filter-name>CorsFilter</filter-name> | |
| 47 | + <url-pattern>/*</url-pattern> | |
| 48 | + </filter-mapping> | |
| 49 | +--> | |
| 50 | +<!--end跨域结束--> | |
| 51 | + | |
| 52 | + <servlet-mapping> | |
| 53 | + <servlet-name>default</servlet-name> | |
| 54 | + <url-pattern>*.xml</url-pattern> | |
| 55 | + </servlet-mapping> | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + <context-param> | |
| 60 | + <param-name>contextConfigLocation</param-name> | |
| 61 | + <param-value> | |
| 62 | + classpath*:/spring/applicationContext.xml | |
| 63 | + </param-value> | |
| 64 | + </context-param> | |
| 65 | + | |
| 66 | + <session-config> | |
| 67 | + <session-timeout>60</session-timeout> | |
| 68 | + </session-config> | |
| 69 | + <context-param> | |
| 70 | + <param-name>log4jConfigLocation</param-name> | |
| 71 | + <param-value>classpath:log4j_config.xml</param-value> | |
| 72 | + </context-param> | |
| 73 | + <context-param> | |
| 74 | + <param-name>log4jRefreshInterval</param-name> | |
| 75 | + <param-value>60000</param-value> | |
| 76 | + </context-param> | |
| 77 | + <servlet> | |
| 78 | + <servlet-name>dispatcher</servlet-name> | |
| 79 | + <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> | |
| 80 | + <init-param> | |
| 81 | + <param-name>contextConfigLocation</param-name> | |
| 82 | + <param-value>classpath*:/spring/applicationContext-mvc.xml</param-value> | |
| 83 | + </init-param> | |
| 84 | + <load-on-startup>1</load-on-startup> | |
| 85 | + </servlet> | |
| 86 | + <servlet-mapping> | |
| 87 | + <servlet-name>dispatcher</servlet-name> | |
| 88 | + <url-pattern>/</url-pattern> | |
| 89 | + </servlet-mapping> | |
| 90 | + | |
| 91 | + <filter> | |
| 92 | + <filter-name>perfFilter</filter-name> | |
| 93 | + <filter-class>com.lyms.platform.common.perf.SimpleHttpPerfFilter</filter-class> | |
| 94 | + <init-param> | |
| 95 | + <param-name>fixName</param-name> | |
| 96 | + <param-value>.jsp,.vm,.js,.css,.ico</param-value> | |
| 97 | + </init-param> | |
| 98 | + <init-param> | |
| 99 | + <param-name>threshold</param-name> | |
| 100 | + <param-value>1500</param-value> | |
| 101 | + </init-param> | |
| 102 | + </filter> | |
| 103 | + <filter-mapping> | |
| 104 | + <filter-name>perfFilter</filter-name> | |
| 105 | + <url-pattern>/*</url-pattern> | |
| 106 | + </filter-mapping> | |
| 107 | + <filter> | |
| 108 | + <filter-name>HttpMethodFilter</filter-name> | |
| 109 | + <filter-class>org.springframework.web.filter.HttpPutFormContentFilter</filter-class> | |
| 110 | + </filter> | |
| 111 | + <filter-mapping> | |
| 112 | + <filter-name>HttpMethodFilter</filter-name> | |
| 113 | + <url-pattern>/*</url-pattern> | |
| 114 | + </filter-mapping> | |
| 115 | + <filter> | |
| 116 | + <filter-name>encodingFilter</filter-name> | |
| 117 | + <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> | |
| 118 | + <init-param> | |
| 119 | + <param-name>encoding</param-name> | |
| 120 | + <param-value>UTF-8</param-value> | |
| 121 | + </init-param> | |
| 122 | + </filter> | |
| 123 | + | |
| 124 | + <filter-mapping> | |
| 125 | + <filter-name>encodingFilter</filter-name> | |
| 126 | + <url-pattern>/*</url-pattern> | |
| 127 | + </filter-mapping> | |
| 128 | + <listener> | |
| 129 | + <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> | |
| 130 | + </listener> | |
| 131 | + <listener> | |
| 132 | + <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> | |
| 133 | + </listener> | |
| 134 | +</web-app> |