이클립스에서 분명 사용하는 bean 리스트를 본것 같은데.. 아무리 찾아도 안나옴..
그래서 로딩된 bean 목록 출력하는것 소스
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
public class RestController {
@Autowired
private DefaultListableBeanFactory dfBean;
@GetMapping("/webportalif/getbean")
public void getBean () {
for(String name : dfBean.getBeanDefinitionNames()) {
log.info(" INFO BEAN NAME === "+name);
}
}
}
출력..
11:28:21.157 [http-nio-8080-exec-6] INFO c.m.w.r.interceptor.WebInterceptor.preHandle 43 - Request URI:/webportalif/getbean, method:GET
11:28:21.158 [http-nio-8080-exec-6] INFO c.m.w.rest.controller.RestController.getBean 42 - INFO BEAN NAME === org.springframework.context.annotation.internalConfigurationAnnotationProcessor
11:28:21.158 [http-nio-8080-exec-6] INFO c.m.w.rest.controller.RestController.getBean 42 - INFO BEAN NAME === org.springframework.context.annotation.internalAutowiredAnnotationProcessor
11:28:21.158 [http-nio-8080-exec-6] INFO c.m.w.rest.controller.RestController.getBean 42 - INFO BEAN NAME === org.springframework.context.annotation.internalCommonAnnotationProcessor
11:28:21.158 [http-nio-8080-exec-6] INFO c.m.w.rest.controller.RestController.getBean 42 - INFO BEAN NAME === org.springframework.context.event.internalEventListenerProcessor
11:28:21.158 [http-nio-8080-exec-6] INFO c.m.w.rest.controller.RestController.getBean 42 - INFO BEAN NAME === org.springframework.context.event.internalEventListenerFactory
11:28:21.158 [http-nio-8080-exec-6] INFO c.m.w.rest.controller.RestController.getBean 42 - INFO BEAN NAME === restApplication
11:28:21.159 [http-nio-8080-exec-6] INFO c.m.w.rest.controller.RestController.getBean 42 - INFO BEAN NAME === org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory
11:28:21.159 [http-nio-8080-exec-6] INFO c.m.w.rest.controller.RestController.getBean 42 - INFO BEAN NAME === webServiceConfig
11:28:21.159 [http-nio-8080-exec-6] INFO c.m.w.rest.controller.RestController.getBean 42 - INFO BEAN NAME === restController
반응형
':::: 개발 :::: > └ JSP & SPRING' 카테고리의 다른 글
인텔리제이 could not find mysql:mysql-connector-java (7) | 2023.04.19 |
---|---|
스프링 부트 http 컨트롤 spring boot http status / header controll (0) | 2023.01.23 |
JPA Specification ( 조회 조건 조합 다이나믹 쿼리) (0) | 2022.07.28 |
@PostConstruct 어노테이션 (0) | 2020.11.13 |
spring boot rest api 애러 처리 (0) | 2020.11.09 |
@ResponseBody response 처리 혹은 예외 처리 (0) | 2020.11.05 |
spring @RequestBody Map<String, Object> Json 핸들링 (0) | 2020.10.30 |
스프링 부트(Spring Boot) - 인터셉터(Interceptor) (0) | 2020.10.26 |