You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
505 B

package cc.bnblogs.beanstudy.entity;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
public class Bird implements InitializingBean, DisposableBean {
public Bird() {
System.out.println("调用无参构造器创建Bird");
}
@Override
public void destroy() {
System.out.println("销毁Bird");
}
@Override
public void afterPropertiesSet() {
System.out.println("初始化Bird");
}
}