shouldApplyFilterRegistrationAnnotation() — spring-boot Function Reference
Architecture documentation for the shouldApplyFilterRegistrationAnnotation() function in ServletContextInitializerBeansTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 49bdf898_fdac_23df_4c40_a6e137bd23b0["shouldApplyFilterRegistrationAnnotation()"] 541ac0f3_54ac_9bf9_4f68_62606fccc254["load()"] 49bdf898_fdac_23df_4c40_a6e137bd23b0 -->|calls| 541ac0f3_54ac_9bf9_4f68_62606fccc254 6e649de9_588e_65d5_305a_1b220d400a28["getContext()"] 49bdf898_fdac_23df_4c40_a6e137bd23b0 -->|calls| 6e649de9_588e_65d5_305a_1b220d400a28 079efcce_86ee_22ae_627e_5c2cb80c3146["assertThatSingleRegistration()"] 49bdf898_fdac_23df_4c40_a6e137bd23b0 -->|calls| 079efcce_86ee_22ae_627e_5c2cb80c3146 27c6d45b_e01a_a42e_b488_83d6e7af3351["getOrder()"] 49bdf898_fdac_23df_4c40_a6e137bd23b0 -->|calls| 27c6d45b_e01a_a42e_b488_83d6e7af3351 style 49bdf898_fdac_23df_4c40_a6e137bd23b0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletContextInitializerBeansTests.java lines 143–167
@Test
@SuppressWarnings("unchecked")
void shouldApplyFilterRegistrationAnnotation() {
load(FilterConfigurationWithAnnotation.class);
ServletContextInitializerBeans initializerBeans = new ServletContextInitializerBeans(
getContext().getBeanFactory(), TestServletContextInitializer.class);
assertThatSingleRegistration(initializerBeans, FilterRegistrationBean.class, (filterRegistrationBean) -> {
assertThat(filterRegistrationBean.isEnabled()).isFalse();
assertThat(filterRegistrationBean.getOrder()).isEqualTo(Ordered.LOWEST_PRECEDENCE);
assertThat(filterRegistrationBean.getFilterName()).isEqualTo("test");
assertThat(filterRegistrationBean.isAsyncSupported()).isFalse();
assertThat(filterRegistrationBean.isMatchAfter()).isTrue();
assertThat(filterRegistrationBean.getServletNames()).containsExactly("test");
assertThat(filterRegistrationBean.determineDispatcherTypes()).containsExactly(DispatcherType.ERROR);
assertThat(filterRegistrationBean.getUrlPatterns()).containsExactly("/test/*");
assertThat(filterRegistrationBean.getInitParameters())
.containsExactlyInAnyOrderEntriesOf(Map.of("env", "test", "debug", "true"));
Collection<ServletRegistrationBean<?>> servletRegistrationBeans = filterRegistrationBean
.getServletRegistrationBeans();
assertThat(servletRegistrationBeans).hasSize(1);
assertThat(servletRegistrationBeans.iterator().next().getServletName())
.isEqualTo("testServletRegistrationBean");
});
}
Domain
Subdomains
Source
Frequently Asked Questions
What does shouldApplyFilterRegistrationAnnotation() do?
shouldApplyFilterRegistrationAnnotation() is a function in the spring-boot codebase.
What does shouldApplyFilterRegistrationAnnotation() call?
shouldApplyFilterRegistrationAnnotation() calls 4 function(s): assertThatSingleRegistration, getContext, getOrder, load.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free