Spring Framework
main(){
ApplicationContext ctx = new GenerieXmlApplicationContext("dept.xml");
DeptService service = ctx.getBean("xxx", DeptService.class);
}
Spring boot
main(){
ApplicationContext ctx = SpringApplication.run(Application.class, args);
DeptService service = ctx.getBean("xxx", DeptService.class);
}
'Framework > SPRING BOOT' 카테고리의 다른 글
AOP (0) | 2023.09.22 |
---|---|
I18N (1) | 2023.09.21 |
의존성 설정 ( DI ) (0) | 2023.09.21 |
bean 생성 (0) | 2023.09.21 |
boot 프로젝트 구조 (0) | 2023.09.21 |