@Test void testOnApplicationEventParent() { ApplicationContext applicationContext = mock(ApplicationContext.class); ContextRefreshedEvent contextRefreshedEvent = mock(ContextRefreshedEvent.class); when(contextRefreshedEvent.getApplicationContext()).thenReturn(applicationContext); bootstrapperListener.onApplicationEvent(contextRefreshedEvent); verify(bootstrapper).bootstrap(contextRefreshedEvent); }
@Timed(value = "bootstrap", description = "Timing information for the bootstrapping event.") @Override public void onApplicationEvent(ContextRefreshedEvent event) { if (event.getApplicationContext().getParent() != null) { return; } bootstrapper.bootstrap(event); SecurityContextHolder.clearContext(); }
BootstrapperListener implements ApplicationListener<ContextRefreshedEvent>, PriorityOrdered { @Timed(value = "bootstrap", description = "Timing information for the bootstrapping event.") @Override public void onApplicationEvent(ContextRefreshedEvent event) { if (event.getApplicationContext().getParent() != null) { return; } bootstrapper.bootstrap(event); SecurityContextHolder.clearContext(); } }
BootstrapperListener implements ApplicationListener<ContextRefreshedEvent>, PriorityOrdered { @Timed(value = "bootstrap", description = "Timing information for the bootstrapping event.") @Override public void onApplicationEvent(ContextRefreshedEvent event) { if (event.getApplicationContext().getParent() != null) { return; } bootstrapper.bootstrap(event); SecurityContextHolder.clearContext(); } BootstrapperListener(Bootstrapper bootstrapper); }
BootstrapperListener implements ApplicationListener<ContextRefreshedEvent>, PriorityOrdered { @Timed(value = "bootstrap", description = "Timing information for the bootstrapping event.") @Override public void onApplicationEvent(ContextRefreshedEvent event) { if (event.getApplicationContext().getParent() != null) { return; } bootstrapper.bootstrap(event); SecurityContextHolder.clearContext(); } BootstrapperListener(Bootstrapper bootstrapper); @Timed(value = "bootstrap", description = "Timing information for the bootstrapping event.") @Override void onApplicationEvent(ContextRefreshedEvent event); @Override int getOrder(); }
BootstrapperListener implements ApplicationListener<ContextRefreshedEvent>, PriorityOrdered { @Timed(value = "bootstrap", description = "Timing information for the bootstrapping event.") @Override public void onApplicationEvent(ContextRefreshedEvent event) { if (event.getApplicationContext().getParent() != null) { return; } bootstrapper.bootstrap(event); SecurityContextHolder.clearContext(); } BootstrapperListener(Bootstrapper bootstrapper); @Timed(value = "bootstrap", description = "Timing information for the bootstrapping event.") @Override void onApplicationEvent(ContextRefreshedEvent event); @Override int getOrder();  }