티스토리 뷰
작업구성
0x0. gradle dependencies
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
0x1. CommandLineRunner 구현
@SpringBootApplication
@Slf4j
public class LoadBeanApplication implements CommandLineRunner {
@Autowired
public ApplicationContext context;
@Override
public void run(String... args) throws Exception {
printBeans();
}
public static void main(String[] args) {
SpringApplication.run(LoadBeanApplication.class, args);
}
private void printBeans() {
String [] beans = context.getBeanDefinitionNames();
Arrays.sort(beans);
log.info("스프링 빈 목록");
for(String s:beans) {
log.info("[Bean]" + s + ", FQCN:" + context.getBean(s).getClass());
}
}
}
결과
스프링 컨테이너에 추가된 모든 Bean 목록을 가져올 수 있다.
2022-11-23 14:02:16.089 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : 스프링 빈 목록
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]appConfig, FQCN:class com.example.loadbean.config.AppConfig$$EnhancerBySpringCGLIB$$5b9adf3b
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]applicationAvailability, FQCN:class org.springframework.boot.availability.ApplicationAvailabilityBean
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]applicationTaskExecutor, FQCN:class org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]basicErrorController, FQCN:class org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]beanNameHandlerMapping, FQCN:class org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]beanNameViewResolver, FQCN:class org.springframework.web.servlet.view.BeanNameViewResolver
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]characterEncodingFilter, FQCN:class org.springframework.boot.web.servlet.filter.OrderedCharacterEncodingFilter
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]classPathFileSystemWatcher, FQCN:class org.springframework.boot.devtools.classpath.ClassPathFileSystemWatcher
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]classPathRestartStrategy, FQCN:class org.springframework.boot.devtools.classpath.PatternClassPathRestartStrategy
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]conditionEvaluationDeltaLoggingListener, FQCN:class org.springframework.boot.devtools.autoconfigure.ConditionEvaluationDeltaLoggingListener
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]conventionErrorViewResolver, FQCN:class org.springframework.boot.autoconfigure.web.servlet.error.DefaultErrorViewResolver
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]defaultServletHandlerMapping, FQCN:class org.springframework.beans.factory.support.NullBean
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]defaultViewResolver, FQCN:class org.springframework.web.servlet.view.InternalResourceViewResolver
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]dispatcherServlet, FQCN:class org.springframework.web.servlet.DispatcherServlet
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]dispatcherServletRegistration, FQCN:class org.springframework.boot.autoconfigure.web.servlet.DispatcherServletRegistrationBean
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]error, FQCN:class org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration$StaticView
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]errorAttributes, FQCN:class org.springframework.boot.web.servlet.error.DefaultErrorAttributes
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]errorPageCustomizer, FQCN:class org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration$ErrorPageCustomizer
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]errorPageRegistrarBeanPostProcessor, FQCN:class org.springframework.boot.web.server.ErrorPageRegistrarBeanPostProcessor
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]fileSystemWatcherFactory, FQCN:class org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$RestartConfiguration$$Lambda$686/0x000000080048f840
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]flashMapManager, FQCN:class org.springframework.web.servlet.support.SessionFlashMapManager
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]forceAutoProxyCreatorToUseClassProxying, FQCN:class org.springframework.boot.autoconfigure.aop.AopAutoConfiguration$ClassProxyingConfiguration$$Lambda$404/0x0000000800371c40
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]formContentFilter, FQCN:class org.springframework.boot.web.servlet.filter.OrderedFormContentFilter
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]handlerExceptionResolver, FQCN:class org.springframework.web.servlet.handler.HandlerExceptionResolverComposite
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]handlerFunctionAdapter, FQCN:class org.springframework.web.servlet.function.support.HandlerFunctionAdapter
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]httpRequestHandlerAdapter, FQCN:class org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter
2022-11-23 14:02:16.090 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]jacksonObjectMapper, FQCN:class com.fasterxml.jackson.databind.ObjectMapper
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]jacksonObjectMapperBuilder, FQCN:class org.springframework.http.converter.json.Jackson2ObjectMapperBuilder
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]jsonComponentModule, FQCN:class org.springframework.boot.jackson.JsonComponentModule
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]jsonMixinModule, FQCN:class org.springframework.boot.jackson.JsonMixinModule
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]lifecycleProcessor, FQCN:class org.springframework.context.support.DefaultLifecycleProcessor
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]liveReloadServer, FQCN:class org.springframework.boot.devtools.livereload.LiveReloadServer
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]liveReloadServerEventListener, FQCN:class org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$LiveReloadServerEventListener
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]loadBeanApplication, FQCN:class com.example.loadbean.LoadBeanApplication$$EnhancerBySpringCGLIB$$571ef2d0
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]localeCharsetMappingsCustomizer, FQCN:class org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration$LocaleCharsetMappingsCustomizer
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]localeResolver, FQCN:class org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mappingJackson2HttpMessageConverter, FQCN:class org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mbeanExporter, FQCN:class org.springframework.jmx.export.annotation.AnnotationMBeanExporter
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mbeanServer, FQCN:class com.sun.jmx.mbeanserver.JmxMBeanServer
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]memberAPI, FQCN:class com.example.loadbean.MemberAPI
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]messageConverters, FQCN:class org.springframework.boot.autoconfigure.http.HttpMessageConverters
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]multipartConfigElement, FQCN:class javax.servlet.MultipartConfigElement
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]multipartResolver, FQCN:class org.springframework.web.multipart.support.StandardServletMultipartResolver
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mvcContentNegotiationManager, FQCN:class org.springframework.web.accept.ContentNegotiationManager
2022-11-23 14:02:16.092 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mvcConversionService, FQCN:class org.springframework.boot.autoconfigure.web.format.WebConversionService
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mvcHandlerMappingIntrospector, FQCN:class org.springframework.web.servlet.handler.HandlerMappingIntrospector
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mvcPathMatcher, FQCN:class org.springframework.util.AntPathMatcher
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mvcPatternParser, FQCN:class org.springframework.web.util.pattern.PathPatternParser
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mvcResourceUrlProvider, FQCN:class org.springframework.web.servlet.resource.ResourceUrlProvider
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mvcUriComponentsContributor, FQCN:class org.springframework.web.method.support.CompositeUriComponentsContributor
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mvcUrlPathHelper, FQCN:class org.springframework.web.util.UrlPathHelper
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mvcValidator, FQCN:class org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport$NoOpValidator
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]mvcViewResolver, FQCN:class org.springframework.web.servlet.view.ViewResolverComposite
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]objectNamingStrategy, FQCN:class org.springframework.boot.autoconfigure.jmx.ParentAwareNamingStrategy
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]optionalLiveReloadServer, FQCN:class org.springframework.boot.devtools.autoconfigure.OptionalLiveReloadServer
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.aop.config.internalAutoProxyCreator, FQCN:class org.springframework.aop.framework.autoproxy.InfrastructureAdvisorAutoProxyCreator
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.AutoConfigurationPackages, FQCN:class org.springframework.boot.autoconfigure.AutoConfigurationPackages$BasePackages
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.aop.AopAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.aop.AopAutoConfiguration$ClassProxyingConfiguration, FQCN:class org.springframework.boot.autoconfigure.aop.AopAutoConfiguration$ClassProxyingConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.context.LifecycleAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.context.LifecycleAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration$StringHttpMessageConverterConfiguration, FQCN:class org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration$StringHttpMessageConverterConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.http.JacksonHttpMessageConvertersConfiguration, FQCN:class org.springframework.boot.autoconfigure.http.JacksonHttpMessageConvertersConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.http.JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration, FQCN:class org.springframework.boot.autoconfigure.http.JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory, FQCN:class org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration, FQCN:class org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration, FQCN:class org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration$JacksonObjectMapperConfiguration, FQCN:class org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration$JacksonObjectMapperConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration$ParameterNamesModuleConfiguration, FQCN:class org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration$ParameterNamesModuleConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.sql.init.SqlInitializationAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.sql.init.SqlInitializationAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.embedded.EmbeddedWebServerFactoryCustomizerAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.embedded.EmbeddedWebServerFactoryCustomizerAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.embedded.EmbeddedWebServerFactoryCustomizerAutoConfiguration$TomcatWebServerFactoryCustomizerConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.embedded.EmbeddedWebServerFactoryCustomizerAutoConfiguration$TomcatWebServerFactoryCustomizerConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration$DispatcherServletConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration$DispatcherServletConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration$DispatcherServletRegistrationConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration$DispatcherServletRegistrationConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryConfiguration$EmbeddedTomcat, FQCN:class org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryConfiguration$EmbeddedTomcat
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter, FQCN:class org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration$DefaultErrorViewResolverConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration$DefaultErrorViewResolverConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration, FQCN:class org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.websocket.servlet.WebSocketServletAutoConfiguration, FQCN:class org.springframework.boot.autoconfigure.websocket.servlet.WebSocketServletAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.autoconfigure.websocket.servlet.WebSocketServletAutoConfiguration$TomcatWebSocketConfiguration, FQCN:class org.springframework.boot.autoconfigure.websocket.servlet.WebSocketServletAutoConfiguration$TomcatWebSocketConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.context.internalConfigurationPropertiesBinder, FQCN:class org.springframework.boot.context.properties.ConfigurationPropertiesBinder
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.context.internalConfigurationPropertiesBinderFactory, FQCN:class org.springframework.boot.context.properties.ConfigurationPropertiesBinder$Factory
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.context.properties.BoundConfigurationProperties, FQCN:class org.springframework.boot.context.properties.BoundConfigurationProperties
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor, FQCN:class org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.context.properties.EnableConfigurationPropertiesRegistrar.methodValidationExcludeFilter, FQCN:class org.springframework.boot.validation.beanvalidation.MethodValidationExcludeFilter$$Lambda$603/0x0000000800436440
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration, FQCN:class org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$LiveReloadConfiguration, FQCN:class org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$LiveReloadConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$RestartConfiguration, FQCN:class org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$RestartConfiguration
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.boot.sql.init.dependency.DatabaseInitializationDependencyConfigurer$DependsOnDatabaseInitializationPostProcessor, FQCN:class org.springframework.boot.sql.init.dependency.DatabaseInitializationDependencyConfigurer$DependsOnDatabaseInitializationPostProcessor
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.context.annotation.internalAutowiredAnnotationProcessor, FQCN:class org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.context.annotation.internalCommonAnnotationProcessor, FQCN:class org.springframework.context.annotation.CommonAnnotationBeanPostProcessor
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.context.annotation.internalConfigurationAnnotationProcessor, FQCN:class org.springframework.context.annotation.ConfigurationClassPostProcessor
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.context.event.internalEventListenerFactory, FQCN:class org.springframework.context.event.DefaultEventListenerFactory
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]org.springframework.context.event.internalEventListenerProcessor, FQCN:class org.springframework.context.event.EventListenerMethodProcessor
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]parameterNamesModule, FQCN:class com.fasterxml.jackson.module.paramnames.ParameterNamesModule
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]preserveErrorControllerTargetClassPostProcessor, FQCN:class org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration$PreserveErrorControllerTargetClassPostProcessor
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]propertySourcesPlaceholderConfigurer, FQCN:class org.springframework.context.support.PropertySourcesPlaceholderConfigurer
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]requestContextFilter, FQCN:class org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]requestMappingHandlerAdapter, FQCN:class org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]requestMappingHandlerMapping, FQCN:class org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
2022-11-23 14:02:16.094 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]resourceHandlerMapping, FQCN:class org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]restTemplateBuilder, FQCN:class org.springframework.boot.web.client.RestTemplateBuilder
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]restTemplateBuilderConfigurer, FQCN:class org.springframework.boot.autoconfigure.web.client.RestTemplateBuilderConfigurer
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]restartingClassPathChangedEventListener, FQCN:class org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$RestartingClassPathChangeChangedEventListener
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]routerFunctionMapping, FQCN:class org.springframework.web.servlet.function.support.RouterFunctionMapping
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]scheduledBeanLazyInitializationExcludeFilter, FQCN:class org.springframework.boot.autoconfigure.task.ScheduledBeanLazyInitializationExcludeFilter
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]server-org.springframework.boot.autoconfigure.web.ServerProperties, FQCN:class org.springframework.boot.autoconfigure.web.ServerProperties
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]servletWebServerFactoryCustomizer, FQCN:class org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryCustomizer
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]simpleControllerHandlerAdapter, FQCN:class org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]spring.devtools-org.springframework.boot.devtools.autoconfigure.DevToolsProperties, FQCN:class org.springframework.boot.devtools.autoconfigure.DevToolsProperties
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]spring.info-org.springframework.boot.autoconfigure.info.ProjectInfoProperties, FQCN:class org.springframework.boot.autoconfigure.info.ProjectInfoProperties
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]spring.jackson-org.springframework.boot.autoconfigure.jackson.JacksonProperties, FQCN:class org.springframework.boot.autoconfigure.jackson.JacksonProperties
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]spring.jmx-org.springframework.boot.autoconfigure.jmx.JmxProperties, FQCN:class org.springframework.boot.autoconfigure.jmx.JmxProperties
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]spring.lifecycle-org.springframework.boot.autoconfigure.context.LifecycleProperties, FQCN:class org.springframework.boot.autoconfigure.context.LifecycleProperties
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]spring.mvc-org.springframework.boot.autoconfigure.web.servlet.WebMvcProperties, FQCN:class org.springframework.boot.autoconfigure.web.servlet.WebMvcProperties
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]spring.servlet.multipart-org.springframework.boot.autoconfigure.web.servlet.MultipartProperties, FQCN:class org.springframework.boot.autoconfigure.web.servlet.MultipartProperties
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]spring.sql.init-org.springframework.boot.autoconfigure.sql.init.SqlInitializationProperties, FQCN:class org.springframework.boot.autoconfigure.sql.init.SqlInitializationProperties
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]spring.task.execution-org.springframework.boot.autoconfigure.task.TaskExecutionProperties, FQCN:class org.springframework.boot.autoconfigure.task.TaskExecutionProperties
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]spring.task.scheduling-org.springframework.boot.autoconfigure.task.TaskSchedulingProperties, FQCN:class org.springframework.boot.autoconfigure.task.TaskSchedulingProperties
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]spring.web-org.springframework.boot.autoconfigure.web.WebProperties, FQCN:class org.springframework.boot.autoconfigure.web.WebProperties
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]springApplicationAdminRegistrar, FQCN:class org.springframework.boot.admin.SpringApplicationAdminMXBeanRegistrar
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]standardJacksonObjectMapperBuilderCustomizer, FQCN:class org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration$StandardJackson2ObjectMapperBuilderCustomizer
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]stringHttpMessageConverter, FQCN:class org.springframework.http.converter.StringHttpMessageConverter
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]taskExecutorBuilder, FQCN:class org.springframework.boot.task.TaskExecutorBuilder
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]taskSchedulerBuilder, FQCN:class org.springframework.boot.task.TaskSchedulerBuilder
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]themeResolver, FQCN:class org.springframework.web.servlet.theme.FixedThemeResolver
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]tomcatServletWebServerFactory, FQCN:class org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]tomcatServletWebServerFactoryCustomizer, FQCN:class org.springframework.boot.autoconfigure.web.servlet.TomcatServletWebServerFactoryCustomizer
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]tomcatWebServerFactoryCustomizer, FQCN:class org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]viewControllerHandlerMapping, FQCN:class org.springframework.beans.factory.support.NullBean
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]viewNameTranslator, FQCN:class org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]viewResolver, FQCN:class org.springframework.web.servlet.view.ContentNegotiatingViewResolver
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]webServerFactoryCustomizerBeanPostProcessor, FQCN:class org.springframework.boot.web.server.WebServerFactoryCustomizerBeanPostProcessor
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]websocketServletWebServerCustomizer, FQCN:class org.springframework.boot.autoconfigure.websocket.servlet.TomcatWebSocketServletWebServerCustomizer
2022-11-23 14:02:16.096 INFO 30280 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]welcomePageHandlerMapping, FQCN:class org.springframework.boot.autoconfigure.web.servlet.WelcomePageHandlerMapping
복잡하므로 내 프로젝트 패키지에 로드된 Bean을 찾으려면 패키지 네이밍으로 필터링하면 된다.
private void printBeans() {
String [] beans = context.getBeanDefinitionNames();
Arrays.sort(beans);
log.info("스프링 빈 목록");
String mainPackage = this.getClass().getPackageName();
log.info(mainPackage);
for(String s : beans) {
if (!context.getBean(s).getClass().toString().contains(mainPackage))
continue;
log.info("[Bean]" + s + ", FQCN:" + context.getBean(s).getClass());
}
}
2022-11-23 14:23:14.320 INFO 8120 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : 스프링 빈 목록
2022-11-23 14:23:14.320 INFO 8120 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : com.example.loadbean
2022-11-23 14:23:14.321 INFO 8120 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]appConfig, FQCN:class com.example.loadbean.config.AppConfig$$EnhancerBySpringCGLIB$$2a819167
2022-11-23 14:23:14.322 INFO 8120 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]loadBeanApplication, FQCN:class com.example.loadbean.LoadBeanApplication$$EnhancerBySpringCGLIB$$2605a4fc
2022-11-23 14:23:14.322 INFO 8120 --- [ restartedMain] c.example.loadbean.LoadBeanApplication : [Bean]memberAPI, FQCN:class com.example.loadbean.MemberAPI
아쉬운 점: 자바의 모든 패키지이름은 특정 클래스를 기반으로 하여야만 구할 수 있다.
(기본 패키지 경로를 나타내는 static variable이 존재하지 않음)
댓글