Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.web.servlet;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.aop.scope.ScopedProxyUtils;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import javax.servlet.Filter;
import javax.servlet.Servlet;
import java.util.AbstractCollection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.EventListener;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
/**
* A copy of org.springframework.boot.web.servlet.ServletContextInitializerBeans without Servlet 3.0 API calls.
*
* A collection {@link ServletContextInitializer}s obtained from a
* {@link ListableBeanFactory}. Includes all {@link ServletContextInitializer} beans and
* also adapts {@link Servlet}, {@link Filter} and certain {@link EventListener} beans.
*
* Items are sorted so that adapted beans are top ({@link Servlet}, {@link Filter} then
* {@link EventListener}) and direct {@link ServletContextInitializer} beans are at the
* end. Further sorting is applied within these groups using the
* {@link AnnotationAwareOrderComparator}.
*
* @author Dave Syer
* @author Phillip Webb
* @author Daniel Cruver
* @since 2.0.0
*/
public class LegacyServletContextInitializerBeans
extends AbstractCollection {
private static final String DISPATCHER_SERVLET_NAME = "dispatcherServlet";
private static final Log logger = LogFactory
.getLog(ServletContextInitializerBeans.class);
/**
* Seen bean instances or bean names.
*/
private final Set