[Spring] Spring bean 이름의 getter/setter 구현

250x250
반응형

import org.springframework.beans.factory.BeanNameAware;

import org.springframework.beans.factory.NamedBean;


public class MyBean implements NamedBean, BeanNameAware {

/**

* 빈 이름

*/

private String beanName;


@Override

public String getBeanName() {

return this.beanName;

}


@Override

public void setBeanName(String name) {

this.beanName = name;

}

}


반응형

Designed by JB FACTORY