|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012-2020 the original author or authors.
|
|
|
|
|
* Copyright 2012-2021 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.
|
|
|
|
@ -20,6 +20,7 @@ import java.io.IOException;
|
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.databind.module.SimpleModule;
|
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
import org.thymeleaf.dialect.IDialect;
|
|
|
|
|
|
|
|
|
|
import org.springframework.context.annotation.ComponentScan.Filter;
|
|
|
|
|
import org.springframework.context.annotation.FilterType;
|
|
|
|
@ -61,6 +62,7 @@ class WebMvcTypeExcludeFilterTests {
|
|
|
|
|
assertThat(excludes(filter, SecurityFilterChain.class)).isFalse();
|
|
|
|
|
assertThat(excludes(filter, ExampleHandlerInterceptor.class)).isFalse();
|
|
|
|
|
assertThat(excludes(filter, ExampleModule.class)).isFalse();
|
|
|
|
|
assertThat(excludes(filter, ExampleDialect.class)).isFalse();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@ -77,6 +79,7 @@ class WebMvcTypeExcludeFilterTests {
|
|
|
|
|
assertThat(excludes(filter, SecurityFilterChain.class)).isFalse();
|
|
|
|
|
assertThat(excludes(filter, ExampleHandlerInterceptor.class)).isFalse();
|
|
|
|
|
assertThat(excludes(filter, ExampleModule.class)).isFalse();
|
|
|
|
|
assertThat(excludes(filter, ExampleDialect.class)).isFalse();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@ -93,6 +96,7 @@ class WebMvcTypeExcludeFilterTests {
|
|
|
|
|
assertThat(excludes(filter, SecurityFilterChain.class)).isTrue();
|
|
|
|
|
assertThat(excludes(filter, ExampleHandlerInterceptor.class)).isTrue();
|
|
|
|
|
assertThat(excludes(filter, ExampleModule.class)).isTrue();
|
|
|
|
|
assertThat(excludes(filter, ExampleDialect.class)).isTrue();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@ -107,6 +111,7 @@ class WebMvcTypeExcludeFilterTests {
|
|
|
|
|
assertThat(excludes(filter, ExampleRepository.class)).isFalse();
|
|
|
|
|
assertThat(excludes(filter, ExampleHandlerInterceptor.class)).isFalse();
|
|
|
|
|
assertThat(excludes(filter, ExampleModule.class)).isFalse();
|
|
|
|
|
assertThat(excludes(filter, ExampleDialect.class)).isFalse();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@ -123,6 +128,7 @@ class WebMvcTypeExcludeFilterTests {
|
|
|
|
|
assertThat(excludes(filter, SecurityFilterChain.class)).isFalse();
|
|
|
|
|
assertThat(excludes(filter, ExampleHandlerInterceptor.class)).isFalse();
|
|
|
|
|
assertThat(excludes(filter, ExampleModule.class)).isFalse();
|
|
|
|
|
assertThat(excludes(filter, ExampleDialect.class)).isFalse();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private boolean excludes(WebMvcTypeExcludeFilter filter, Class<?> type) throws IOException {
|
|
|
|
@ -200,4 +206,13 @@ class WebMvcTypeExcludeFilterTests {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static class ExampleDialect implements IDialect {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getName() {
|
|
|
|
|
return "example";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|