单例模式(Singleton Pattern)是指确保一个类在任何情况下都只有一个实例,提供一个全局访问点并隐藏其所有的构造方法。 常见的单例模式场景有: - ServletContext - ServletConfig - ApplicationContext - DBPool
单例模式(Singleton Pattern)是指确保一个类在任何情况下都只有一个实例,提供一个全局访问点并隐藏其所有的构造方法。 常见的单例模式场景有: - ServletContext - ServletConfig - ApplicationContext - DBPool