随笔分类 -  设计模式

摘要:懒汉式 public class Singleton { private static Singleton instance; private Singleton() { } public static synchronized Singleton getInstance() { if (insta 阅读全文
posted @ 2022-10-29 23:18 咖啡因的取悦 阅读(21) 评论(0) 推荐(0)
摘要:在Spring下的策略模式 定义一个注解类Module @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Module { /** * 属于哪个模块 */ Str 阅读全文
posted @ 2022-10-27 22:01 咖啡因的取悦 阅读(30) 评论(0) 推荐(0)