use of org.springframework.core.metrics.StartupStep in project spring-boot by spring-projects.
the class StartupEndpointDocumentationTests method appendSampleStartupSteps.
@BeforeEach
void appendSampleStartupSteps(@Autowired BufferingApplicationStartup applicationStartup) {
StartupStep starting = applicationStartup.start("spring.boot.application.starting");
starting.tag("mainApplicationClass", "com.example.startup.StartupApplication");
StartupStep instantiate = applicationStartup.start("spring.beans.instantiate");
instantiate.tag("beanName", "homeController");
instantiate.end();
starting.end();
}
use of org.springframework.core.metrics.StartupStep in project spring-framework by spring-projects.
the class AnnotationConfigApplicationContext method scan.
/**
* Perform a scan within the specified base packages.
* <p>Note that {@link #refresh()} must be called in order for the context
* to fully process the new classes.
* @param basePackages the packages to scan for component classes
* @see #register(Class...)
* @see #refresh()
*/
@Override
public void scan(String... basePackages) {
Assert.notEmpty(basePackages, "At least one base package must be specified");
StartupStep scanPackages = this.getApplicationStartup().start("spring.context.base-packages.scan").tag("packages", () -> Arrays.toString(basePackages));
this.scanner.scan(basePackages);
scanPackages.end();
}
Aggregations