/*
* Copyright 2012-2020 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
*
* https://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.autoconfigure.web.servlet;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.ValidatorFactory;
import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration;
import org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration;
import org.springframework.boot.autoconfigure.validation.ValidatorAdapter;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter;
import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext;
import org.springframework.boot.test.context.runner.ContextConsumer;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
import org.springframework.boot.web.server.WebServerFactoryCustomizerBeanPostProcessor;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.boot.web.servlet.filter.OrderedFormContentFilter;
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.core.convert.ConversionService;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.task.AsyncTaskExecutor;
import org.springframework.format.Parser;
import org.springframework.format.Printer;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.CacheControl;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.test.util.ReflectionTestUtils;
import org.springframework.util.StringUtils;
import org.springframework.validation.Validator;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.accept.ContentNegotiationStrategy;
import org.springframework.web.accept.ParameterContentNegotiationStrategy;
import org.springframework.web.accept.PathExtensionContentNegotiationStrategy;
import org.springframework.web.bind.support.ConfigurableWebBindingInitializer;
import org.springframework.web.context.request.ServletWebRequest;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.FormContentFilter;
import org.springframework.web.filter.HiddenHttpMethodFilter;
import org.springframework.web.filter.RequestContextFilter;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.servlet.HandlerAdapter;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.HandlerMapping;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver;
import org.springframework.web.servlet.handler.HandlerExceptionResolverComposite;
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
import org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver;
import org.springframework.web.servlet.i18n.FixedLocaleResolver;
import org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver;
import org.springframework.web.servlet.resource.AppCacheManifestTransformer;
import org.springframework.web.servlet.resource.CachingResourceResolver;
import org.springframework.web.servlet.resource.CachingResourceTransformer;
import org.springframework.web.servlet.resource.ContentVersionStrategy;
import org.springframework.web.servlet.resource.CssLinkResourceTransformer;
import org.springframework.web.servlet.resource.EncodedResourceResolver;
import org.springframework.web.servlet.resource.FixedVersionStrategy;
import org.springframework.web.servlet.resource.PathResourceResolver;
import org.springframework.web.servlet.resource.ResourceHttpRequestHandler;
import org.springframework.web.servlet.resource.ResourceResolver;
import org.springframework.web.servlet.resource.ResourceTransformer;
import org.springframework.web.servlet.resource.VersionResourceResolver;
import org.springframework.web.servlet.resource.VersionStrategy;
import org.springframework.web.servlet.view.AbstractView;
import org.springframework.web.servlet.view.ContentNegotiatingViewResolver;
import org.springframework.web.util.UrlPathHelper;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
/**
* Tests for {@link WebMvcAutoConfiguration}.
*
* @author Phillip Webb
* @author Dave Syer
* @author Andy Wilkinson
* @author Stephane Nicoll
* @author Brian Clozel
* @author Eddú Meléndez
* @author Kristine Jetzke
* @author Artsiom Yudovin
*/
class WebMvcAutoConfigurationTests {
private static final MockServletWebServerFactory webServerFactory = new MockServletWebServerFactory();
private final WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withConfiguration(
AutoConfigurations.of(WebMvcAutoConfiguration.class, DispatcherServletAutoConfiguration.class,
HttpMessageConvertersAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class))
.withUserConfiguration(Config.class);
@Test
void handlerAdaptersCreated() {
this.contextRunner.run((context) -> {
assertThat(context
没有合适的资源?快使用搜索试试~ 我知道了~
spring-boot-2.3.6.RELEASE.tar.gz
需积分: 0 0 下载量 82 浏览量
2024-04-21
13:37:25
上传
评论
收藏 4.79MB GZ 举报
温馨提示
共2000个文件
java:1899个
sql:28个
html:24个
SpringBoot for linux 各个版本,免费下载 spring-boot for linux 各个版本,免费下载 如果不能免费下载,关注我,评论区联系我索要!
资源推荐
资源详情
资源评论
收起资源包目录
spring-boot-2.3.6.RELEASE.tar.gz (2000个子文件)
custom.css 2B
layout.html 379B
layout.html 334B
view.html 315B
partial.html 314B
index.html 188B
home.html 126B
message.html 76B
java8time-dialect.html 76B
security-dialect.html 64B
content.html 54B
home.html 48B
data-dialect.html 45B
template.html 34B
index.html 19B
foo.html 16B
4xx.html 10B
404.html 10B
5xx.html 8B
4xx.html 8B
402.html 8B
4xx.html 8B
foo_de.html 2B
custom.html 1B
actuator-docs-index.html 1B
WebMvcAutoConfigurationTests.java 52KB
ServerProperties.java 40KB
RabbitAutoConfigurationTests.java 39KB
CacheAutoConfigurationTests.java 38KB
KafkaAutoConfigurationTests.java 35KB
KafkaProperties.java 32KB
FlywayAutoConfigurationTests.java 27KB
OnBeanCondition.java 27KB
WebMvcAutoConfiguration.java 26KB
WebFluxAutoConfigurationTests.java 26KB
ServletWebServerFactoryAutoConfigurationTests.java 25KB
ConditionalOnMissingBeanTests.java 25KB
RabbitProperties.java 23KB
HibernateJpaAutoConfigurationTests.java 23KB
JmsAutoConfigurationTests.java 22KB
ReactiveWebServerFactoryAutoConfigurationTests.java 21KB
ReactiveOAuth2ResourceServerAutoConfigurationTests.java 21KB
ArtemisAutoConfigurationTests.java 21KB
ServerPropertiesTests.java 20KB
TomcatWebServerFactoryCustomizerTests.java 20KB
DefaultErrorWebExceptionHandlerIntegrationTests.java 20KB
FlywayAutoConfiguration.java 19KB
OAuth2ClientPropertiesRegistrationAdapterTests.java 19KB
QuartzAutoConfigurationTests.java 19KB
AutoConfigurationImportSelector.java 18KB
OAuth2ResourceServerAutoConfigurationTests.java 18KB
BasicErrorControllerIntegrationTests.java 18KB
JacksonAutoConfigurationTests.java 18KB
AutoConfiguredHealthEndpointGroupsTests.java 17KB
LiquibaseAutoConfigurationTests.java 17KB
HealthEndpointAutoConfigurationTests.java 17KB
BatchAutoConfigurationTests.java 17KB
ReactiveCloudFoundryActuatorAutoConfigurationTests.java 16KB
ReactiveTokenValidatorTests.java 16KB
FlywayProperties.java 15KB
AbstractJpaAutoConfigurationTests.java 15KB
RedisAutoConfigurationTests.java 15KB
ConditionalOnBeanTests.java 15KB
MultipartAutoConfigurationTests.java 15KB
HttpMessageConvertersAutoConfigurationTests.java 14KB
AbstractErrorWebExceptionHandler.java 14KB
NoSuchBeanDefinitionFailureAnalyzerTests.java 14KB
JettyWebServerFactoryCustomizerTests.java 14KB
NoSuchBeanDefinitionFailureAnalyzer.java 14KB
ThymeleafServletAutoConfigurationTests.java 14KB
TomcatWebServerFactoryCustomizer.java 14KB
PropertiesMeterFilterTests.java 13KB
SessionAutoConfiguration.java 13KB
CloudFoundryActuatorAutoConfigurationTests.java 13KB
SessionAutoConfigurationTests.java 13KB
TokenValidatorTests.java 13KB
ConditionEvaluationReportTests.java 13KB
ConditionMessage.java 13KB
DataSourceProperties.java 13KB
MongoClientFactorySupportTests.java 13KB
ValidationAutoConfigurationTests.java 13KB
ActiveMQAutoConfigurationTests.java 12KB
AutoConfigurationImportSelectorTests.java 12KB
WebMvcProperties.java 12KB
ResourceProperties.java 12KB
ThymeleafAutoConfiguration.java 12KB
WebFluxAutoConfiguration.java 12KB
ElasticsearchRestClientAutoConfigurationTests.java 12KB
DataSourceInitializerInvokerTests.java 12KB
IntegrationAutoConfigurationTests.java 12KB
ErrorMvcAutoConfiguration.java 12KB
EndpointRequestTests.java 12KB
DataSourceAutoConfigurationTests.java 12KB
AutoConfiguredHealthEndpointGroupTests.java 12KB
CloudFoundryWebFluxEndpointIntegrationTests.java 12KB
EndpointRequest.java 11KB
ReactiveOAuth2ClientAutoConfigurationTests.java 11KB
ConditionalOnPropertyTests.java 11KB
DataSourcePoolMetricsAutoConfigurationTests.java 11KB
R2dbcAutoConfigurationTests.java 11KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
段子手-168
- 粉丝: 2098
- 资源: 2470
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功