https://github.com/Snailclimb/springboot-guide/blob/master/docs/basis/@PostConstruct%E4%B8%8E@PreDestroy.md @PreDestroy : 当 bean 被 Web 容器的时候被调用,一般用来释放 bean 所持有的资源。。PostConstruct 注解的方法会在Servlet 的destroy()方法之前执行。 这里的PostConstruct注解应该是PreDestroy 吧,是不是笔误了