首页 > 其他分享 >springboot学习

springboot学习

时间:2022-11-26 17:13:52浏览次数:29  
标签:springboot destory System 学习 println public out

package com.cy.pj.common.cache;
@Component
        
@Scope("singleton")
@Lazy // 不会启动的时候就加载类
        
public class DefaultCache {
        public DefaultCache() {
           System.out.println("cache()");
        }
        @PostConstruct
        public void init() {
                System.out.println("init()");
        }
        @PreDestroy
        public void destory() {
                System.out.println("destory");
        }
}

标签:springboot,destory,System,学习,println,public,out
From: https://www.cnblogs.com/ch2020/p/16927752.html

相关文章