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.
 
 
 

26 lines
488 B

package cc.bnblogs.beanstudy.entity;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
public class Fish {
public Fish() {
System.out.println("调用无参构造器创建Fish");
}
/**
* 初始化方法
*/
@PostConstruct
public void init() {
System.out.println("初始化Fish");
}
/**
* 销毁方法
*/
@PreDestroy
public void destroy() {
System.out.println("销毁Fish");
}
}