import org.springframework.beans.factory.BeanNameAware;import org.springframework.beans.factory.NamedBean; public class MyBean implements NamedBean, BeanNameAware {/** * 빈 이름 */private String beanName; @Overridepublic String getBeanName() {return this.beanName;} @Overridepublic void setBeanName(String name) {this.beanName = name;}}
public class MyBean implements BeanNameAware, BeanFactoryAware {/** * 빈 이름 */protected String beanName; @Overridepublic void setBeanName(String name) {this.beanName = name;} @Overridepublic void setBeanFactory(BeanFactory beanFactory) throws BeansException {// scope가 prototype만 허용if (beanFactory.isPrototype(this.beanName) == false) {throw new BeanCreationException(this.beanName, "Scope of bean m..
* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.