사용자 도구

사이트 도구


springframework:bean

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
springframework:bean [2015/11/17 13:59]
kwon37xi
springframework:bean [2021/11/12 13:05] (현재)
kwon37xi
줄 1: 줄 1:
 ====== SpringFramework Bean ====== ====== SpringFramework Bean ======
-  * [[springframework:javaconfig|Springframework Java Config]] 관련. 
  
 ===== Springframework Bean Life Cycle ===== ===== Springframework Bean Life Cycle =====
 +  * [[springframework:bean_lifecycle|Spring Framework Bean Lifecycle]]
   * [[http://blog.outsider.ne.kr/776|[Spring 레퍼런스] 4장 IoC 컨테이너 #8 4.8 컨테이너 확장점(Extension Points)]]   * [[http://blog.outsider.ne.kr/776|[Spring 레퍼런스] 4장 IoC 컨테이너 #8 4.8 컨테이너 확장점(Extension Points)]]
  
줄 17: 줄 17:
  
 ===== Dynamic Bean Definition - 동적 Bean 생성 ===== ===== Dynamic Bean Definition - 동적 Bean 생성 =====
 +  * [[http://www.tutorialspoint.com/spring/spring_bean_definition.htm|Spring Bean Definition]]
 +
 ==== 구현 ==== ==== 구현 ====
   * [[http://docs.spring.io/autorepo/docs/spring-framework/current//javadoc-api/org/springframework/beans/factory/support/BeanDefinitionRegistryPostProcessor.html|BeanDefinitionRegistryPostProcessor]]를 구현한다.<code java>   * [[http://docs.spring.io/autorepo/docs/spring-framework/current//javadoc-api/org/springframework/beans/factory/support/BeanDefinitionRegistryPostProcessor.html|BeanDefinitionRegistryPostProcessor]]를 구현한다.<code java>
줄 41: 줄 43:
 } }
 </code> </code>
-  ** ''postProcessBeanFactory''는 필요없을 경우 구현하지 않고 빈 메소드로 남겨둔다.+  * [[http://docs.spring.io/autorepo/docs/spring-framework/current//javadoc-api/org/springframework/beans/factory/support/BeanDefinitionBuilder.html|BeanDefinitionBuilder]]를 사용해서 Bean을 선언할 수 있다. 
 +  * ''postProcessBeanFactory''는 필요없을 경우 구현하지 않고 빈 메소드로 남겨둔다.
  
 ==== 설정에 등록 ==== ==== 설정에 등록 ====
-  * 해당 구현체 자체를 ''@Configuration''으로 지정하거나, +  * 해당 구현체 자체를 ''@Configuration''으로 지정하거나 그냥 ''@Bean''으로 생성하는 것은 작동하지 않는다. 
-  * 혹은 [[http://docs.spring.io/autorepo/docs/spring-framework/current//javadoc-api/org/springframework/context/ApplicationContextInitializer.html|ApplicationContextInitializer]] 안에서 [[http://docs.spring.io/autorepo/docs/spring-framework/current//javadoc-api/org/springframework/context/ConfigurableApplicationContext.html#addBeanFactoryPostProcessor-org.springframework.beans.factory.config.BeanFactoryPostProcessor-|applicationContext.addBeanFactoryPostProcessor]]로 등록한다.+  * [[http://docs.spring.io/autorepo/docs/spring-framework/current//javadoc-api/org/springframework/context/ApplicationContextInitializer.html|ApplicationContextInitializer]] 안에서 [[http://docs.spring.io/autorepo/docs/spring-framework/current//javadoc-api/org/springframework/context/ConfigurableApplicationContext.html#addBeanFactoryPostProcessor-org.springframework.beans.factory.config.BeanFactoryPostProcessor-|applicationContext.addBeanFactoryPostProcessor]]로 등록한다. 
 + 
  
 ==== 참조 ==== ==== 참조 ====
   * [[http://blog.jdriven.com/2015/04/spicy-spring-dynamically-create-your-own-beandefinition/|Spicy Spring : Dynamically create your own BeanDefinition]]   * [[http://blog.jdriven.com/2015/04/spicy-spring-dynamically-create-your-own-beandefinition/|Spicy Spring : Dynamically create your own BeanDefinition]]
   * [[https://dzone.com/articles/how-create-your-own-dynamic|How to Create Your Own 'Dynamic' Bean Definitions in Spring]]   * [[https://dzone.com/articles/how-create-your-own-dynamic|How to Create Your Own 'Dynamic' Bean Definitions in Spring]]
springframework/bean.1447738176.txt.gz · 마지막으로 수정됨: 2015/11/17 13:59 저자 kwon37xi