ScheduledBeanLazyInitializationExcludeFilterTests Class — spring-boot Architecture
Architecture documentation for the ScheduledBeanLazyInitializationExcludeFilterTests class in ScheduledBeanLazyInitializationExcludeFilterTests.java from the spring-boot codebase.
Entity Profile
Source Code
core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/ScheduledBeanLazyInitializationExcludeFilterTests.java lines 32–71
class ScheduledBeanLazyInitializationExcludeFilterTests {
private final ScheduledBeanLazyInitializationExcludeFilter filter = new ScheduledBeanLazyInitializationExcludeFilter();
@Test
void beanWithScheduledMethodIsDetected() {
assertThat(isExcluded(TestBean.class)).isTrue();
}
@Test
void beanWithSchedulesMethodIsDetected() {
assertThat(isExcluded(AnotherTestBean.class)).isTrue();
}
@Test
void beanWithoutScheduledMethodIsDetected() {
assertThat(isExcluded(ScheduledBeanLazyInitializationExcludeFilterTests.class)).isFalse();
}
private boolean isExcluded(Class<?> type) {
return this.filter.isExcluded("test", new RootBeanDefinition(type), type);
}
private static final class TestBean {
@Scheduled
void doStuff() {
}
}
private static final class AnotherTestBean {
@Schedules({ @Scheduled(fixedRate = 5000), @Scheduled(fixedRate = 2500) })
void doStuff() {
}
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free