详情参见:https://www.cnblogs.com/landiljy/p/5764515.html 1.@PostConstruct说明 被@PostConstruct修饰的方法会在服务器加载Servlet的时候运行,并且只会被服务器调用一次,类似于Serclet的inti()方法.被@PostConstruct修饰的方法会在构造函数之后,init()方法之前运行. 2.@PreConstruct说明 被@PreConstruct修饰的方法会在服务器卸载Servlet的时候运行,并且只会被…