一、maven的pom文件<?xmlversion="1.0"encoding="UTF-8"?><projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.
分类:
编程语言 时间:
2018-10-08 17:19:27
阅读次数:
183
技术选型 经过各种技术调研我们最终选择的方案是基于 "Single SPA" 来实现我们的前端微服务化. Single SPA 一个用于前端微服务化的JavaScript前端解决方案 使用Single SPA之后,你可以这样做: (兼容各种技术栈)在同一个页面中使用多种技术框架(React, Vue ...
分类:
其他好文 时间:
2018-10-08 16:01:45
阅读次数:
4297
<?php class single{ static public $db; private function __construct(){ }; static function getinstance(){ if(!self::$db) self::$bd = new self(); return ...
分类:
Web程序 时间:
2018-10-08 15:56:41
阅读次数:
199
Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runti ...
分类:
其他好文 时间:
2018-10-08 13:59:22
阅读次数:
129
Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string. Example 1: Note ...
分类:
编程语言 时间:
2018-10-08 12:10:17
阅读次数:
170
题目 Given a non empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear ru ...
分类:
其他好文 时间:
2018-10-08 12:07:57
阅读次数:
201
单例模式 单例模式就是在系统运行期间有且只有一个实例,且只能提供私有的构造器,保证不能随意创建该类的实例。 第一种(饿汉模式) 上述代码在类加载时就完成了初始化操作,故加载类较慢,但是获取对象的速度很快,也称饿汉模式,并且饿汉模式是在类初始化时就以及自行 实例化,因此不存在线程安全问题。 第二种(懒 ...
分类:
其他好文 时间:
2018-10-07 15:31:11
阅读次数:
144
package cn.zz; /** * * @author Administrator 饿汉式: class single{private static Single s=new Single(); private Single(){ } public static getInstance(){ ...
分类:
编程语言 时间:
2018-10-07 14:38:39
阅读次数:
144
简介 单例模式是一种常用的软件设计模式,其定义是单例对象的类只能允许一个实例存在。 许多时候整个系统只需要拥有一个的全局对象,这样有利于我们协调系统整体的行为。比如在某个服务器程序中,该服务器的配置信息存放在一个文件中,这些配置数据由一个单例对象统一读取,然后服务进程中的其他对象再通过这个单例对象获 ...
分类:
其他好文 时间:
2018-10-07 13:03:22
阅读次数:
170
错误代码 参考:https://blog.csdn.net/qq_27468251/article/details/81359701 改为 ...
分类:
Web程序 时间:
2018-10-06 21:28:24
阅读次数:
1921