作者:じ☆ve不哭
## 注意事项 本文的环境都是系统自带的openssh,若是手动编译安装的,不保证成功。若是自带的,则升级过程中不需要卸载旧版本openssh。 安装之前可以先试试yum更新,若是可以更新,就不需要往下看了 ## centos8 ``` $ yum update openssh -y ``` ## 重启sshd ``` $ systemctl restart sshd ``` ## 准备工作 ### 系统说明 - 系统版本:CentOS Linux release 7.7.1908 (Core) - openssh:OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 - openssl: OpenSSL 1.0.2k-fips 26 Jan 2017 ### 下载最新包 - openssh - openssl 本文选择的是: openssh-8.2p1.tar.gz openssl-1.1.1g.tar.gz ``` wget https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-8.2p1.tar.gz wget https://ftp.openssl.org/source/openssl-1.1.1g.tar.gz ``` ### 安装telnet备用(可选) 安装新的ssh之后,只要配置好启动,就可以做到无缝切换,但是中途断开就不能连接了,为了防止这种情况,我们可以安装telnet当作备用,若是你能保证中途不会断开,此步骤可以忽略 1.安装 ``` $ yum install telnet telnet-server -y ``` 2.启动 ``` $ systemctl enable telnet.socket $ systemctl start telnet.socket ``` 3.连接 ``` # telnet 默认禁止root用户连接,我们先生成一个普通用户 $ useradd testuser $ passwd testuser # 本地测试 $ telnet 127.0.0.1 VM_0_6_centos login: testuser Password: [testuser@VM_0_6_centos ~]$ # 切换root [testuser@VM_0_6_centos ~]$ su ``` ## 升级openssl ### 备份 ``` $ mv /usr/bin/openssl /usr/bin/openssl_old ``` ### 安装 ``` $ tar xzvf openssl-1.1.1g.tar.gz $ cd openssl-1.1.1g/ $ ./config shared && make && make install ``` ### 配置软连接 ``` $ ln -s /usr/local/bin/openssl /usr/bin/openssl ``` 如果执行openssl version报下面的错误 ``` openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory 则执行下面命令解决: $ ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/ $ ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/ ``` 旧版本: ``` $ openssl_old version OpenSSL 1.0.2k-fips 26 Jan 2017 ``` ## 升级openssh ### 安装所需依赖 ``` $ yum install zlib-devel openssl-devel pam-devel -y ``` ### 备份 ``` $ mkdir /etc/ssh_old $ mv /etc/ssh/* /etc/ssh_old/ ``` ### 解压、编译安装 ``` $ tar xzvf openssh-8.2p1.tar.gz $ cd openssh-8.2p1/ $ ./configure --prefix=/usr/ --sysconfdir=/etc/ssh --with-ssl-dir=/usr/local/lib64/ --with-zlib --with-pam --with-md5-password --with-ssl-engine --with-selinux ``` ### 安装 ``` $ make && make install ``` ### 验证 ``` $ ssh -V OpenSSH_8.2p1, OpenSSL 1.1.1g 21 Apr 2020 $ ls /etc/ssh moduli ssh_config sshd_config ssh_host_dsa_key ssh_host_dsa_key.pub ssh_host_ecdsa_key ssh_host_ecdsa_key.pub ssh_host_ed25519_key ssh_host_ed25519_key.pub ssh_host_rsa_key ssh_host_rsa_key.pub ``` ### 配置 1.修改sshd_config ``` $ vim /etc/ssh/sshd_config # 例子:配置root登录, 根据你以前的配置来 PermitRootLogin yes ``` ### 2.启动 ``` # 移走以前的ssh服务, 防止与新的冲突 $ mv /usr/lib/systemd/system/sshd.service /etc/ssh_old/sshd.service $ mv /usr/lib/systemd/system/sshd.socket /etc/ssh_old/sshd.socket # 在解压包中拷贝一些文件 $ cp -a contrib/redhat/sshd.init /etc/init.d/sshd # 重新启动 $ /etc/init.d/sshd restart $ systemctl daemon-reload # 添加自启动 $ chkconfig --add sshd $ chkconfig sshd on ``` ### 可能碰到的问题: - /etc/init.d/sshd restart之后报错 ``` Reloading systemd: [ 确定 ] Restarting sshd (via systemctl): Job for sshd.service failed because the control process exited with error code. See "systemctl status sshd.service" and "journalctl -xe" for details. [失败] 是selinux导致,需要关闭 ``` ### 临时修改 ``` setenforce 0 ``` ### 永久修改 ``` sed -i 's/SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config ``` ### 重启 ``` /etc/init.d/sshd restart ``` 原文链接:https://segmentfault.com/a/1190000022756834
作者:微信小助手
<h1 style="margin-top: 10px;margin-bottom: 10px;font-size: 28px;font-weight: bold;line-height: 1.5;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">一、闲聊</h1> <hr style="font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> 现在基本上是隔几天写一篇文章,还是不够勤奋,努力把自己打造成勤奋的人,把工作上面所用到的技术点分享给大家。为了研究k8s自动化部署aspnet core项目,足足花费了我一个礼拜的时间,过程是痛苦的,但结果是美好的。</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">如果以下内容有不足的地方,请指出,我会第一时间更正。谢谢大家。</p> <h1 style="margin-top: 10px;margin-bottom: 10px;font-size: 28px;font-weight: bold;line-height: 1.5;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">二、部署流程介绍</h1> <hr style="font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> <strong> 1、先上一下手绘导图,大致的流程图如下:(不喜勿喷呀)</strong></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">大致的部署流程是这样的:开发人员把做好的asp.net core项目代码通过git推送到gitlab,然后Jenkins通过 gitlab webhook (前提是配置好),自动从拉取gitlab上面拉取代码下来,然后进行build,编译、生成镜像、然后把镜像推送到Harbor仓库;然后在部署的时候通过k8s拉取Harbor上面的代码进行创建容器和服务,最终发布完成,然后可以用外网访问。(ps:看着我讲这么简单,但心里有许多小鹿在心里乱撞,没关系,下面将会好好的分享给大家)</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.4576719576719577" src="/upload/f95736db9f6f3f8cbfac3f49060ddcaa.png" data-type="png" data-w="1512" height="422" style="border-width: initial;border-style: none;border-color: initial;max-width: 800px;cursor: zoom-in;transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1) 0s !important;" width="922"></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> </p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">当然啦,上面只是粗略的,请看下图才更加形象。</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.4625" src="/upload/6c887416e653d92d11d7472ba09dc8c8.png" data-type="png" data-w="1680" height="429" style="border-width: initial;border-style: none;border-color: initial;max-width: 800px;cursor: zoom-in;transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1) 0s !important;" width="927"></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> </p> <h3 style="margin-top: 10px;margin-bottom: 10px;font-weight: bold;line-height: 1.5;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> 2、先介绍一下我的服务器IP和在各个服务器上面所安装的内容</h3> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">ps:由于我的电脑配置有限,运行太多的虚拟机会导致内存空间不够用,因此就弄了三台,已经是极限了。</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">如果大家对于k8s怎么部署,请看我之前的文章有介绍。前提是要安装好docker环境、gitlab等</p> <table> <tbody> <tr> <td style="padding: 8px 14px;border-color: rgb(192, 192, 192);border-collapse: collapse;min-width: 50px;">IP</td> <td style="padding: 8px 14px;border-color: rgb(192, 192, 192);border-collapse: collapse;min-width: 50px;">角色</td> </tr> <tr> <td style="padding: 8px 14px;border-color: rgb(192, 192, 192);border-collapse: collapse;min-width: 50px;">192.168.161.151</td> <td style="padding: 8px 14px;border-color: rgb(192, 192, 192);border-collapse: collapse;min-width: 50px;">master1、Harbor、Jenkins</td> </tr> <tr> <td style="padding: 8px 14px;border-color: rgb(192, 192, 192);border-collapse: collapse;min-width: 50px;">192.168.161.152</td> <td style="padding: 8px 14px;border-color: rgb(192, 192, 192);border-collapse: collapse;min-width: 50px;">node1</td> </tr> <tr> <td style="padding: 8px 14px;border-color: rgb(192, 192, 192);border-collapse: collapse;min-width: 50px;">192.168.161.153</td> <td style="padding: 8px 14px;border-color: rgb(192, 192, 192);border-collapse: collapse;min-width: 50px;">node2、Gitlab</td> </tr> </tbody> </table> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> </p> <h1 style="margin-top: 10px;margin-bottom: 10px;font-size: 28px;font-weight: bold;line-height: 1.5;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">三、部署Harbor仓库</h1> <hr style="font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> <h3 style="margin-top: 10px;margin-bottom: 10px;font-weight: bold;line-height: 1.5;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> 第一步:下载harbor二进制文件:https://github.com/goharbor/harbor/releases</h3> <h3 style="margin-top: 10px;margin-bottom: 10px;font-weight: bold;line-height: 1.5;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">第二步:安装 docker compose</h3> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">命令:</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">然后把下载的docker-compose 设置可执行权限</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">命令:chmod +x /usr/local/bin/docker-compose</p> <h3 style="margin-top: 10px;margin-bottom: 10px;font-weight: bold;line-height: 1.5;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">第三步:此处应该设置自签证书的,即访问的时候是采用HTTPS进行访问的。此处略去,不影响我们接下去的部署。(后期会出一篇关于自签证书的文章,仅供参考)</h3> <h3 style="margin-top: 10px;margin-bottom: 10px;font-weight: bold;line-height: 1.5;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">第四步:将下载好的Harbor二进制包上传到服务器上面,然后解压出来</h3> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">解压的命令为:tar xzvf 包名</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.06719367588932806" src="/upload/1be6dc1ca5ad96bd6d12776ff25deb0e.png" data-type="png" data-w="506" style="border-width: initial;border-style: none;border-color: initial;max-width: 800px;cursor: zoom-in;transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1) 0s !important;"></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> </p> <h3 style="margin-top: 10px;margin-bottom: 10px;font-weight: bold;line-height: 1.5;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">第五步:进入解压出来的文件夹harbor中,有如下文件。</h3> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.04466357308584687" src="/upload/a6cef6548844ad4283529e1c544ba348.png" data-type="png" data-w="1724" style="border-width: initial;border-style: none;border-color: initial;max-width: 800px;cursor: zoom-in;transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1) 0s !important;"></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> </p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">配置文件,vi harbor.cfg</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">把其中的hostname修改为:master1 的IP地址。</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.4875" src="/upload/4f462d6e205919a54133142b08d5ca61.png" data-type="png" data-w="400" style="border-width: initial;border-style: none;border-color: initial;max-width: 800px;cursor: zoom-in;transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1) 0s !important;"></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> </p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">然后 修改harbor的登录密码:为了方便起见,我修改为123456,大家可自行修改</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.3395784543325527" src="/upload/967a316df8cb5de4f1612ee7f8ed055.png" data-type="png" data-w="427" style="border-width: initial;border-style: none;border-color: initial;max-width: 800px;cursor: zoom-in;transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1) 0s !important;"></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> </p> <h3 style="margin-top: 10px;margin-bottom: 10px;font-weight: bold;line-height: 1.5;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> 第六步:在当前文件夹中开启harbor</h3> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">执行命令:</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><strong>./prepare</strong></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.7445997458703939" src="/upload/7980d7b19c511377ac6c6e70568d8970.png" data-type="png" data-w="787" height="514" style="border-width: initial;border-style: none;border-color: initial;max-width: 800px;cursor: zoom-in;transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1) 0s !important;" width="690"></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> </p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> </p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><strong>./install.sh (运行此处的时候需要一定的时间,请等待吧)</strong></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> <img data-ratio="0.3970037453183521" src="/upload/c13bba78f3ba8ca89874e2e4cbf61b89.png" data-type="png" data-w="534" style="border-width: initial;border-style: none;border-color: initial;max-width: 800px;cursor: zoom-in;transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1) 0s !important;"></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> </p> <h3 style="margin-top: 10px;margin-bottom: 10px;font-weight: bold;line-height: 1.5;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> 第七步:启动成功,查看一下(完美的运行)</h3> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">docker-compose ps</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.17535545023696683" src="/upload/35f96fbc49de306f0205eab7780148f7.png" data-type="png" data-w="1477" style="border-width: initial;border-style: none;border-color: initial;max-width: 800px;cursor: zoom-in;transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1) 0s !important;"></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> </p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"> 用浏览器查看一下(出现以下内容,代表成功,完美)</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">进入到里面后,我先在用户管理中创建了一个用户 louie 。大家自行创建,为了后期需要把一些依赖镜像先推送到harbor仓库中。然后在项目中创建项目,如下:</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.9640102827763496" src="/upload/80ab7e4e3a402c291c2a12f27f9bccac.png" data-type="png" data-w="778" height="517" style="border-width: initial;border-style: none;border-color: initial;max-width: 800px;cursor: zoom-in;transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1) 0s !important;" width="536"></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">所创建的项目,并且,我在每个项目中都加入了我刚才所创建的用户,方便后期登录并推送镜像</p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);"><img data-ratio="0.7667844522968198" src="/upload/488d39e0f4d9779b9d25d07318cdd841.png" data-type="png" data-w="283" style="border-width: initial;border-style: none;border-color: initial;max-width: 800px;cursor: zoom-in;transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1) 0s !important;"> <img data-ratio="1.4511627906976745" src="/upload/31ef0edc18dd59ac40e2b0f7de05bd7e.png" data-type="png" data-w="215" style="border-width: initial;border-style: none;border-color: initial;max-width: 800px;cursor: zoom-in;transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1) 0s !important;"></p> <p style="margin: 10px auto;font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;background-color: rgb(255, 255, 255);">此处介绍一下我的项目,coresdk 主要用来存放 asp.net core 所需要的sdk;ops主要是用来存放的jenkins镜像和jenkins-slave镜像;projectdemo 主要存放我的asp.netcore 项目的镜像,供k8s拉取。</p> <p style="margin: 10px auto;font-family: "PingFang SC&qu
作者:微信小助手
<section style="font-size: 15px;color: rgb(62, 62, 62);line-height: 1.6;letter-spacing: 0px;font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;" data-mpa-powered-by="yiban.io"> <p style="letter-spacing: 0.544px;white-space: normal;color: rgb(62, 62, 62);font-size: 15px;font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;background-color: rgb(255, 255, 255);text-size-adjust: auto;word-spacing: 2px;text-align: center;"><span style="letter-spacing: 0.544px;color: rgb(136, 136, 136);font-size: 14px;">点击蓝色“</span><span style="letter-spacing: 0.544px;font-size: 14px;color: rgb(0, 128, 255);">架构文摘</span><span style="letter-spacing: 0.544px;color: rgb(136, 136, 136);font-size: 14px;">”关注我哟</span></p> <p style="margin-bottom: 10px;letter-spacing: 0.544px;white-space: normal;color: rgb(62, 62, 62);font-size: 15px;font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;background-color: rgb(255, 255, 255);text-size-adjust: auto;word-spacing: 2px;text-align: center;"><span style="font-size: 14px;color: rgb(136, 136, 136);">加个“</span><span style="color: rgb(0, 128, 255);font-size: 14px;">星标</span><span style="font-size: 14px;color: rgb(136, 136, 136);">”,每天上午 09:25,干货推送!</span></p> <p style="letter-spacing: 0.544px;white-space: normal;color: rgb(62, 62, 62);font-size: 14px;font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;background-color: rgb(255, 255, 255);text-align: center;"><img data-backh="36" data-backw="578" data-ratio="0.0625" data-s="300,640" data-type="jpeg" data-w="640" width="100%" src="/upload/8c292e55ba5a23cb6ebc11f2a2c4fece.jpg" style="font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;widows: 1;word-spacing: 2px;color: rgb(136, 136, 136);box-sizing: border-box !important;visibility: visible !important;width: 677px !important;"></p> <p style="letter-spacing: 0.544px;white-space: normal;color: rgb(62, 62, 62);font-size: 14px;font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;background-color: rgb(255, 255, 255);text-align: right;"><em><span style="font-size: 12px;">来源:https://juejin.cn/post/6931890118538199048</span></em></p> <p style="font-size: inherit;color: inherit;line-height: inherit;"><br></p> <blockquote style="padding: 15px 15px 15px 1rem;color: rgb(129, 145, 152);border-left-width: 6px;border-left-color: rgb(220, 230, 240);font-size: 0.9em;line-height: inherit;background: rgb(242, 247, 251);overflow: auto;overflow-wrap: normal;word-break: normal;font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;text-align: start;white-space: normal;"> <p style="font-size: inherit;color: inherit;line-height: inherit;">血一般的教训,请慎用insert into select。同事应用之后,导致公司损失了近10w元,最终被公司开除。</p> </blockquote> <figure style="font-size: inherit;color: inherit;line-height: inherit;"> <figcaption style="line-height: inherit;margin-top: 10px;text-align: center;color: rgb(153, 153, 153);font-size: 0.7em;"> <br> </figcaption> </figure> <h3 style="line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;color: rgb(21, 153, 87);font-size: 1.3em;"><span style="font-size: inherit;color: inherit;line-height: inherit;">事情的起因</span></h3> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">公司的交易量比较大,使用的数据库是mysql,每天的增量差不多在百万左右,公司并没有分库分表,所以想维持这个表的性能只能考虑做数据迁移。</p> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">同事李某接到了这个任务,于是他想出了这两个方案</p> <ul style="font-size: inherit;color: inherit;line-height: inherit;padding-left: 32px;" class="list-paddingleft-2"> <li style="font-size: inherit;color: inherit;line-height: inherit;margin-bottom: 0.5em;"><p><span style="font-size: inherit;color: inherit;line-height: inherit;">先通过程序查询出来,然后插入历史表,再删除原表</span></p></li> <li style="font-size: inherit;color: inherit;line-height: inherit;margin-bottom: 0.5em;"><p><span style="font-size: inherit;color: inherit;line-height: inherit;">使用insert into select让数据库IO来完成所有操作</span></p></li> </ul> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">第一个方案使用的时候发现一次性全部加载,系统直接就OOM了,但是分批次做就过多io和时间长,于是选用了第二种方案,测试的时候没有任何问题,开开心心上线,然后被开除。</p> <h3 style="line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;color: rgb(21, 153, 87);font-size: 1.3em;"><span style="font-size: inherit;color: inherit;line-height: inherit;">到底发生了啥,我们复盘一下</span></h3> <ul style="font-size: inherit;color: inherit;line-height: inherit;padding-left: 32px;" class="list-paddingleft-2"> <li style="font-size: inherit;color: inherit;line-height: inherit;margin-bottom: 0.5em;"><p><span style="font-size: inherit;color: inherit;line-height: inherit;">先来看第一个方案,先看伪代码</span></p></li> </ul> <pre style="font-size: inherit;color: inherit;line-height: inherit;"><code style="margin-right: 2px;margin-left: 2px;line-height: 18px;font-size: 14px;letter-spacing: 0px;font-family: Consolas, Inconsolata, Courier, monospace;border-radius: 0px;color: rgb(169, 183, 198);background: rgb(40, 43, 46);padding: 0.5em;overflow-wrap: normal !important;word-break: normal !important;overflow: auto !important;display: -webkit-box !important;"> <span style="font-size: inherit;line-height: inherit;color: rgb(128, 128, 128);overflow-wrap: inherit !important;word-break: inherit !important;">// 1、查询对应需要迁移的数据</span><br> <span style="font-size: inherit;line-height: inherit;color: rgb(248, 35, 117);overflow-wrap: inherit !important;word-break: inherit !important;">List</span><Object> <span style="font-size: inherit;line-height: inherit;color: rgb(248, 35, 117);overflow-wrap: inherit !important;word-break: inherit !important;">list</span> = selectData();<br><br> <span style="font-size: inherit;line-height: inherit;color: rgb(128, 128, 128);overflow-wrap: inherit !important;word-break: inherit !important;">// 2、将数据插入历史表</span><br> insertData(<span style="font-size: inherit;line-height: inherit;color: rgb(248, 35, 117);overflow-wrap: inherit !important;word-break: inherit !important;">list</span>);<br><br> <span style="font-size: inherit;line-height: inherit;color: rgb(128, 128, 128);overflow-wrap: inherit !important;word-break: inherit !important;">// 3、删除原表数据</span><br> deleteByIds(ids);<br> 复制代码<br></code></pre> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">我们可以从这段代码中看到,OOM的原因很简单,我们直接将数据全部加载内存,内存不爆才怪。</p> <ul style="font-size: inherit;color: inherit;line-height: inherit;padding-left: 32px;" class="list-paddingleft-2"> <li style="font-size: inherit;color: inherit;line-height: inherit;margin-bottom: 0.5em;"><p><span style="font-size: inherit;color: inherit;line-height: inherit;">再来看看第二个方案,到底发生了啥</span></p></li> </ul> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">为了维持表的性能,同时保留有效数据,经过商量定了一个量,保留10天的数据,差不多要在表里面保留1kw的数据。所以同事就做了一个时间筛选的操作,直接<code style="font-size: inherit;line-height: inherit;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);">insert into select ... dateTime < (Ten days ago)</code>,爽极了,直接就避免了要去分页查询数据,这样就不存在OOM啦。还简化了很多的代码操作,减少了网络问题。</p> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">为了测试,还特意建了1kw的数据来模拟,测试环境当然是没有问题啦,顺利通过。考虑到这个表是一个支付流水表,于是将这个任务做成定时任务,并且定在晚上8点执行。</p> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">晚上量也不是很大,自然是没有什么问题,但是第二天公司财务上班,开始对账,发现资金对不上,很多流水都没有入库。最终排查发现晚上8点之后,陆陆续续开始出现支付流水插入失败的问题,很多数据因此丢失。最终定位到了是迁移任务引起的问题,刚开始还不明所以,白天没有问题,然后想到晚上出现这样的情况可能是晚上的任务出现了影响,最后停掉该任务的第二次上线,发现没有了这样的情况。</p> <h3 style="line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;color: rgb(21, 153, 87);font-size: 1.3em;"><span style="font-size: inherit;color: inherit;line-height: inherit;">复盘</span></h3> <ul style="font-size: inherit;color: inherit;line-height: inherit;padding-left: 32px;" class="list-paddingleft-2"> <li style="font-size: inherit;color: inherit;line-height: inherit;margin-bottom: 0.5em;"><p><span style="font-size: inherit;color: inherit;line-height: inherit;">问题在哪里?</span></p></li> </ul> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">为什么停掉迁移的任务之后就好了呢?这个insert into select操作到底做了什么?我们来看看这个语句的explain。</p> <figure style="font-size: inherit;color: inherit;line-height: inherit;"> <img data-ratio="0.16634615384615384" src="/upload/fa70c5507730cccb2ff7344cd84a4958.png" data-type="png" data-w="1040" style="font-size: inherit;color: inherit;line-height: inherit;display: block;margin-right: auto;margin-left: auto;" title="在这里插入图片描述"> <figcaption style="line-height: inherit;margin-top: 10px;text-align: center;color: rgb(153, 153, 153);font-size: 0.7em;"> 在这里插入图片描述 </figcaption> </figure> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">我们不难从图中看出,这个查询语句直接走了全表扫描。这个时候,我们不难猜想到一点点问题。如果全表扫描,我们这个表这么大,是不是意味着迁移的时间会很长?假若我们这个迁移时间为一个小时,那是不是意味着就解释了我们白天没有出现这样问题的原因了。但是全表扫描是最根本的原因吗?</p> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">我们不妨试试,一边迁移,一边做些的操作,还原现场。最终还是会出现这样的问题。这个时候,我们可以调整一下,大胆假设,如果不全表扫描,是不是就不会出现这样的问题。当我们将条件修改之后,果然发现没有走了全表扫描了。最终再次还原现场,问题解决了</p> <figure style="font-size: inherit;color: inherit;line-height: inherit;"> <img data-ratio="0.18529130850047756" src="/upload/b5cd3479e45b8277a2eadf19c837521a.png" data-type="png" data-w="1047" style="font-size: inherit;color: inherit;line-height: inherit;display: block;margin-right: auto;margin-left: auto;" title="在这里插入图片描述"> <figcaption style="line-height: inherit;margin-top: 10px;text-align: center;color: rgb(153, 153, 153);font-size: 0.7em;"> 在这里插入图片描述 </figcaption> </figure> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">得出结论:<strong style="font-size: inherit;color: inherit;line-height: inherit;">全表扫描导致了这次事故的发生。</strong></p> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">这样做就解决了发生的问题,但是做为陆陆续续开始失败这个就不好解释了。</p> <ul style="font-size: inherit;color: inherit;line-height: inherit;padding-left: 32px;" class="list-paddingleft-2"> <li style="font-size: inherit;color: inherit;line-height: inherit;margin-bottom: 0.5em;"><p><span style="font-size: inherit;color: inherit;line-height: inherit;">原因</span></p></li> </ul> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">在默认的事务隔离级别下:<code style="font-size: inherit;line-height: inherit;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);">insert into a select b</code>的操作a表示直接锁表,b表是逐条加锁。这也就解释了为什么出现陆续的失败的原因。在逐条加锁的时候,流水表由于多数是复合记录,所以最终部分在扫描的时候被锁定,部分拿不到锁,最终导致超时或者直接失败,还有一些在这加锁的过成功成功了。</p> <ul style="font-size: inherit;color: inherit;line-height: inherit;padding-left: 32px;" class="list-paddingleft-2"> <li style="font-size: inherit;color: inherit;line-height: inherit;margin-bottom: 0.5em;"><p><span style="font-size: inherit;color: inherit;line-height: inherit;">为什么测试没有问题?</span></p></li> </ul> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">在测试的时候充分的使用了正式环境的数据来测试,但是别忽视一个问题,那就是测试环境毕竟是测试环境,在测试的时候,数据量真实并不代表就是真实的业务场景。比方说,这个情况里面就少了一个迁移的时候,大量数据的插入这样的情况。最终导致线上bug</p> <h3 style="line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;color: rgb(21, 153, 87);font-size: 1.3em;"><span style="font-size: inherit;color: inherit;line-height: inherit;">解决办法</span></h3> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">既然我们避免全表扫描就可以解决,我们避免它就行了。想要避免全表扫描,对where后面的条件做索引,让我们的select查询都走索引即可</p> <h3 style="line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;color: rgb(21, 153, 87);font-size: 1.3em;"><span style="font-size: inherit;color: inherit;line-height: inherit;">insert into还能用吗?</span></h3> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">可以</p> <h3 style="line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;font-weight: bold;color: rgb(21, 153, 87);font-size: 1.3em;"><span style="font-size: inherit;color: inherit;line-height: inherit;">总结</span></h3> <p style="font-size: inherit;color: inherit;line-height: inherit;margin-top: 1.5em;margin-bottom: 1.5em;">使用insert into select的时候请慎重,一定要做好索引</p> </section> <p><br></p> <section data-mpa-template="t" mpa-from-tpl="t" style="letter-spacing: 0.544px;font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;text-align: left;widows: 1;word-spacing: 2px;font-size: 16px;caret-color: rgb(0, 0, 0);color: rgb(120, 114, 114);"> <section data-id="89429" mpa-from-tpl="t" style="border-width: 0px;border-style: none;border-color: initial;"> <section mpa-from-tpl="t" style="text-align: center;height: 50px;"> <section mpa-from-tpl="t" style="margin-right: auto;margin-left: auto;width: 48px;height: 48px;color: rgb(255, 255, 255);line-height: 48px;display: inline-block;background-image: url("https://mmbiz.qpic.cn/mmbiz_gif/kiaqiahsnxHd4Zt4378tqib1DnnfKYvZAI7sUNZCYmGN2HCMDFDYV5hLu6HrHIK5BynAAwgHGiafFFU7ibYez6mXL4w/640?wx_fmt=gif");background-size: 100%;background-position: 0px center;background-repeat: no-repeat;"> <p style="font-weight: bold;"><span style="font-size: 14px;">end</span></p> </section> <section mpa-from-tpl="t" style="margin-top: -26px;height: 2px;background-color: rgb(34, 33, 33);"> <br> </section> </section> </section> </section> <section style="margin-top: 15px;margin-bottom: 15px;letter-spacing: 0.544px;text-align: center;"> <strong><span style="font-size: 16px;">关注公众号《Java派》</span></strong> </section> <section style="margin-top: 15px;margin-bottom: 15px;letter-spacing: 0.544px;text-align: center;"> <strong><span style="font-size: 16px;">学Java不迷路</span></strong> </section> <section class="mp_profile_iframe_wrp"> <mpprofile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-id="MzA5MTU0OTY0Ng==" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/zc3KLDBfJlmPt0J5PXYOoiaG8wsQPZrLevbxMZSfgQ0YypNYaicnbS0P9UicluuOySLSP4CjTcRUVHCZzYeXQ9WlA/0?wx_fmt=png" data-nickname="Java派" data-alias="" data-signature="专注Java相关技术栈:Spring全家筒、Docker、k8s、Mysql、集群、微服务、中间件等知识。"></mpprofile> </section> <section style="letter-spacing: 0.544px;"> <br> </section> <section data-recommend-type="list-title" data-recommend-tid="6" data-mpa-template="t" data-mid="" data-from="yb-recommend" style="width: 677px;display: flex;justify-content: center;align-items: center;"> <section data-mid="" style="padding: 14px;width: 677px;background-image: initial;background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;border-radius: 3px;border-width: 1px;border-style: solid;border-color: rgb(232, 232, 235);"> <section data-mid="" style="width: 647px;display: flex;justify-content: center;align-items: flex-end;"> <section data-mid="" style="margin-bottom: -14px;padding: 4px 22px;height: 28px;font-size: 14px;color: rgb(19, 52, 86);line-height: 20px;background-image: url("https://mmbiz.qpic.cn/mmbiz_png/sUbvrqLicbpzB81mjeBxPuxnYdalGxNnJo30L2Hq3WwGficcq8w5YJkLeXnsNHocN53k55TfN5mBpCdicGRyfDg1g/640?wx_fmt=png");background-repeat: no-repeat;background-size: 100% 100%;z-index: 10;"> <p data-mid="">往期推荐</p> </section> </section> <section data-mid="" style="padding: 17px 16px 9px;width: 647px;border-width: 1px;border-style: solid;border-color: rgb(198, 226, 255);"> <section data-mpa-template="t" data-recommend-article-type="list-title" data-recomment-template-id="6" data-recommend-article-id="2247496170_1" data-recommend-article-time="1614737844" data-recommend-article-cover="http://mmbiz.qpic.cn/mmbiz_jpg/Baq5lYpIw7Wfp9tE8AOYiamTEMbGqBkz6fhJHB2bnSm1oTRD87y2ARicSSrYlTWjmZZzLet6AW9ibibiaxtpBpLea6Q/0?wx_fmt=jpeg" data-recommend-article-title="为什么在做微服务设计的时候需要DDD?" data-recommend-article-content-url="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247496170&idx=1&sn=794c951180ebfd6ce7868be50853f67e&chksm=9f449d22a833143407dbccac0568a3249b6a19b34fe2220f682f1f4990bcfe90931f0b191f3c#rd"> <a href="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247496170&idx=1&sn=794c951180ebfd6ce7868be50853f67e&chksm=9f449d22a833143407dbccac0568a3249b6a19b34fe2220f682f1f4990bcfe90931f0b191f3c&scene=21#wechat_redirect" data-linktype="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;"> <section data-recommend-title="t" data-recommend-content="t" data-mid="" style="padding: 6px;width: 613px;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed rgb(198, 226, 255);font-size: 13px;color: rgb(44, 95, 149);line-height: 18px;"> <p data-mid="" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">为什么在做微服务设计的时候需要DDD?</p> </section></a> </section> <section data-mpa-template="t" data-recommend-article-type="list-title" data-recomment-template-id="6" data-recommend-article-id="2247496182_1" data-recommend-article-time="1614824157" data-recommend-article-cover="http://mmbiz.qpic.cn/mmbiz_jpg/Baq5lYpIw7XRliauJ1v9SgwsMvKI528oTs35nzg7CAGVr4W6YQknVchubKxQbW0By9qQvsYjGQJEsGmxe8t3joQ/0?wx_fmt=jpeg" data-recommend-article-title="吊打MySQL,MariaDB到底强在哪?" data-recommend-article-content-url="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247496182&idx=1&sn=1d4af2cc81039a330e85224a4c1deec7&chksm=9f449d3ea83314280d68ab7442ea9bcf756954804e8a570cd34a42535bba47607c2e416bab13#rd"> <a href="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247496182&idx=1&sn=1d4af2cc81039a330e85224a4c1deec7&chksm=9f449d3ea83314280d68ab7442ea9bcf756954804e8a570cd34a42535bba47607c2e416bab13&scene=21#wechat_redirect" data-linktype="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;"> <section data-recommend-title="t" data-recommend-content="t" data-mid="" style="padding: 6px;width: 613px;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed rgb(198, 226, 255);font-size: 13px;color: rgb(44, 95, 149);line-height: 18px;"> <p data-mid="" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">吊打MySQL,MariaDB到底强在哪?</p> </section></a> </section> <section data-mpa-template="t" data-recommend-article-type="list-title" data-recomment-template-id="6" data-recommend-article-id="2247496155_1" data-recommend-article-time="1614648300" data-recommend-article-cover="http://mmbiz.qpic.cn/mmbiz_jpg/A1HKVXsfHNm5H4McPOgicXu1mjiag4ZfxcY6WZxgAvtbXEzZShQBGNnjOfnxtfjYsyU95vXkYrCenFej1VFxPPIw/0?wx_fmt=jpeg" data-recommend-article-title="一篇文章搞懂Filebeat" data-recommend-article-content-url="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247496155&idx=1&sn=91524c1c9ad001fcd865fcc841fe6705&chksm=9f449d13a83314054b86c08a6cadc467af4287666da5efd6c31767a4c4b43cc16ad9ef888f20#rd"> <a href="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247496155&idx=1&sn=91524c1c9ad001fcd865fcc841fe6705&chksm=9f449d13a83314054b86c08a6cadc467af4287666da5efd6c31767a4c4b43cc16ad9ef888f20&scene=21#wechat_redirect" data-linktype="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;"> <section data-recommend-title="t" data-recommend-content="t" data-mid="" style="padding: 6px;width: 613px;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed rgb(198, 226, 255);font-size: 13px;color: rgb(44, 95, 149);line-height: 18px;"> <p data-mid="" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">一篇文章搞懂Filebeat</p> </section></a> </section> <section data-mpa-template="t" data-recommend-article-type="list-title" data-recomment-template-id="6" data-recommend-article-id="2247495843_1" data-recommend-article-time="1613613534" data-recommend-article-cover="http://mmbiz.qpic.cn/mmbiz_jpg/Baq5lYpIw7Xw5O0BAcMkOk4IPFRlDUYBJVBGojDHdrN3icr1nxOIV1nEDYt4lo8ZRz7YfaOAibqxnjhX4EJJ4Yhg/0?wx_fmt=jpeg" data-recommend-article-title="ElasticSearch 面试 4 连问,你顶得住么?" data-recommend-article-content-url="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247495843&idx=1&sn=53cfbecd2f3a453c75323a755e856fbb&chksm=9f449c6ba833157d9440cb477c856fe032a8e006d44a062dcc9a81443924f0eb53ac6db5b185#rd"> <a href="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247495843&idx=1&sn=53cfbecd2f3a453c75323a755e856fbb&chksm=9f449c6ba833157d9440cb477c856fe032a8e006d44a062dcc9a81443924f0eb53ac6db5b185&scene=21#wechat_redirect" data-linktype="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;"> <section data-recommend-title="t" data-recommend-content="t" data-mid="" style="padding: 6px;width: 613px;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed rgb(198, 226, 255);font-size: 13px;color: rgb(44, 95, 149);line-height: 18px;"> <p data-mid="" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">ElasticSearch 面试 4 连问,你顶得住么?</p> </section></a> </section> <section data-mpa-template="t" data-recommend-article-type="list-title" data-recomment-template-id="6" data-recommend-article-id="2247495797_1" data-recommend-article-time="1613523642" data-recommend-article-cover="http://mmbiz.qpic.cn/mmbiz_jpg/Baq5lYpIw7WbG2c8KAgvDv5gur40wtmmg5jdmbfNHkKhriaspxXoUxoYwicadmT5QqBraaA5bhP3WLY9HYNf7aqA/0?wx_fmt=jpeg" data-recommend-article-title="手把手教你搭建高可用 RocketMQ 集群!" data-recommend-article-content-url="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247495797&idx=1&sn=bc06121c5c6b8680e156f8fcf8b6347c&chksm=9f449cbda83315ab70e3df8e38493605266223ad1bdc751415d4620c976c7d71de3ba7d84196#rd"> <a href="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247495797&idx=1&sn=bc06121c5c6b8680e156f8fcf8b6347c&chksm=9f449cbda83315ab70e3df8e38493605266223ad1bdc751415d4620c976c7d71de3ba7d84196&scene=21#wechat_redirect" data-linktype="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;"> <section data-recommend-title="t" data-recommend-content="t" data-mid="" style="padding: 6px;width: 613px;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed rgb(198, 226, 255);font-size: 13px;color: rgb(44, 95, 149);line-height: 18px;"> <p data-mid="" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">手把手教你搭建高可用 RocketMQ 集群!</p> </section></a> </section> <section data-mpa-template="t" data-recommend-article-type="list-title" data-recomment-template-id="6" data-recommend-article-id="2247495774_1" data-recommend-article-time="1613439455" data-recommend-article-cover="http://mmbiz.qpic.cn/sz_mmbiz_jpg/knmrNHnmCLHbaMXO2mE5aqicPibDSUKehoAceW0FeFm1v3bRx5E3JziajBCeMYpyv3lMQseOCnrPkH5Q98Sl8oIag/0?wx_fmt=jpeg" data-recommend-article-title="一个员工的离职成本到底有多恐怖!" data-recommend-article-content-url="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247495774&idx=1&sn=a0fa217565d18e78ad3a26d78342e1f8&chksm=9f449c96a8331580fb0193caf5b3a61358169db540c9d661e7cab643af516b4e2b9f4662912e#rd"> <a href="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247495774&idx=1&sn=a0fa217565d18e78ad3a26d78342e1f8&chksm=9f449c96a8331580fb0193caf5b3a61358169db540c9d661e7cab643af516b4e2b9f4662912e&scene=21#wechat_redirect" data-linktype="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;"> <section data-recommend-title="t" data-recommend-content="t" data-mid="" style="padding: 6px;width: 613px;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed rgb(198, 226, 255);font-size: 13px;color: rgb(44, 95, 149);line-height: 18px;"> <p data-mid="" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">一个员工的离职成本到底有多恐怖!</p> </section></a> </section> <section data-mpa-template="t" data-recommend-article-type="list-title" data-recomment-template-id="6" data-recommend-article-id="2247495757_1" data-recommend-article-time="1613354990" data-recommend-article-cover="http://mmbiz.qpic.cn/mmbiz_jpg/A1HKVXsfHNkXiaChvticziaFQCbXsWlQ3R2lBEZSjmagVyK4XOkht5FcgaC3a4ULLPE7JSTPriakogqpYghZibCichtA/0?wx_fmt=jpeg" data-recommend-article-title="搞懂ELK并不是一件特别难的事" data-recommend-article-content-url="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247495757&idx=1&sn=5f253106f92f956b8e77997fa82994c8&chksm=9f449c85a8331593297e87001e861074b2bbf497f44994c6a9985a7fd66ec86bd33f42b95bc2#rd"> <a href="http://mp.weixin.qq.com/s?__biz=MzA3ODIxNjYxNQ==&mid=2247495757&idx=1&sn=5f253106f92f956b8e77997fa82994c8&chksm=9f449c85a8331593297e87001e861074b2bbf497f44994c6a9985a7fd66ec86bd33f42b95bc2&scene=21#wechat_redirect" data-linktype="2" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;"> <section data-recommend-title="t" data-recommend-content="t" data-mid="" style="padding: 6px;width: 613px;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;font-size: 13px;color: rgb(44, 95, 149);line-height: 18px;border-bottom: none !important;"> <p data-mid="" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">搞懂ELK并不是一件特别难的事</p> </section></a> </section> </section> </section> </section> <p><br></p> <p><br></p> <p style="margin-top: 5px;letter-spacing: 0.544px;color: rgb(62, 62, 62);font-size: 15px;widows: 1;word-spacing: 2px;font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;caret-color: rgb(0, 0, 0);text-align: right;"><img class="rich_pages" data-ratio="0.5555555555555556" data-s="300,640" data-type="jpeg" data-w="900" src="/upload/9d786e52e671b1ce4beb338d1e0d1815.jpg" style="letter-spacing: 0.544px;text-align: center;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;box-sizing: border-box !important;visibility: visible !important;width: 677px !important;"><span style="letter-spacing: 0.544px;font-size: 14px;">如有收获,点个在看,诚挚感谢</span><img data-ratio="1" data-type="png" data-w="19" width="19px" src="/upload/5f7454d24a334e968c32b8ce9ae53c5.png" style="font-size: 16px;letter-spacing: 0.544px;display: inline-block;vertical-align: text-bottom;box-sizing: border-box !important;visibility: visible !important;width: 19px !important;"></p>
作者:微信小助手
<section data-mpa-template-id="549497" data-mpa-color="null" data-mpa-category="收藏" data-mpa-powered-by="yiban.io"> <section data-tools="135编辑器" data-id="23"> <section> <p style="color: rgb(0, 0, 0);font-size: 16px;letter-spacing: 0.544px;text-align: left;white-space: normal;word-spacing: 2px;background-color: rgb(255, 255, 255);font-family: -apple-system, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;"><span style="font-size: 14px;letter-spacing: 0.544px;font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;">往期热门文章:<br></span></p> <section data-role="outer" label="Powered by 135editor.com" style="color: rgb(0, 0, 0);font-size: 16px;letter-spacing: 0.544px;text-align: left;white-space: normal;word-spacing: 2px;background-color: rgb(255, 255, 255);font-family: -apple-system, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;"> <section> <section data-tools="135编辑器" data-id="96463"> <section> <section> <section> <section> <pre style="letter-spacing: 0.544px;"><pre style="letter-spacing: 0.544px;color: rgb(62, 62, 62);font-size: 15px;"><pre style="letter-spacing: 0.544px;"><h4 style="font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;color: rgb(0, 0, 0);"><p style="margin-top: 10px;margin-bottom: 10px;font-size: 15px;font-variant-numeric: normal;font-variant-east-asian: normal;letter-spacing: 0.544px;caret-color: rgb(255, 0, 0);line-height: 1.75em;text-indent: 0em;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;">1、</span><a href="http://mp.weixin.qq.com/s?__biz=MzI1NDQ3MjQxNA==&mid=2247489898&idx=1&sn=5c5e41a0f695649046de3db1b1810df5&chksm=e9c5e0dbdeb269cd52f798c675f58295ad0f632283c0fb07db4140949c72796deed7dfe7d434&scene=21#wechat_redirect" target="_blank" data-itemshowtype="0" data-linktype="2" hasload="1" style="color: var(--weui-LINK);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;">《</a><a href="http://mp.weixin.qq.com/s?__biz=MzI1NDQ3MjQxNA==&mid=2247489402&idx=2&sn=af5c3bb38717e828d92ed48874f03fe8&chksm=e9c5eecbdeb267dd3d05c159bdb9c611f24c4ca7fb7dafa12daf459becb0ef4fab7bcc2d1a67&scene=21#wechat_redirect" target="_blank" data-linktype="2" style="color: var(--weui-LINK);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;"><span style="font-size: 14px;vertical-align: inherit;">往期</span><span style="cursor: pointer;letter-spacing: 0.544px;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);font-size: 14px;vertical-align: inherit;">精选优秀博文都在这里了!</span><span style="cursor: pointer;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);letter-spacing: 0.544px;vertical-align: inherit;">》</span></a></p><p style="margin-top: 10px;margin-bottom: 10px;font-size: 15px;font-variant-numeric: normal;font-variant-east-asian: normal;letter-spacing: 0.544px;caret-color: rgb(255, 0, 0);line-height: 1.75em;text-indent: 0em;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;">2、<a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzI1NDQ3MjQxNA==&mid=2247495183&idx=1&sn=822bcdd889b5b6e1f6cd6d261e239f77&chksm=e9c617bedeb19ea833dea7152421faa9c07bdeda2ce253507fcaa02582354236141179ca36d0&scene=21#wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2">2020年国内互联网公司的薪酬排名!</a></span></p><p style="margin-top: 10px;margin-bottom: 10px;font-size: 15px;font-variant-numeric: normal;font-variant-east-asian: normal;letter-spacing: 0.544px;caret-color: rgb(255, 0, 0);line-height: 1.75em;text-indent: 0em;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;"><a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzI1NDQ3MjQxNA==&mid=2247495111&idx=1&sn=ff4ea52a64be6608bfcc20cd444ccc5a&chksm=e9c61476deb19d60d31a8c463c00c450fa5ab360e6f11abf1628a4eea74a675bbd6c972b237b&scene=21#wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;">3、</a><a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzI1NDQ3MjQxNA==&mid=2247495164&idx=1&sn=a547a6f4cf5ccc24010f2e9c40906e3a&chksm=e9c6144ddeb19d5b4e5b824c4cef656e33bc77786b93a14a64b7e70eb253a331d623a0aae5fc&scene=21#wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2">不要再封装各种Util工具类了,这个神级框架值得拥有!</a></span></p><p style="margin-top: 10px;margin-bottom: 10px;font-size: 15px;font-variant-numeric: normal;font-variant-east-asian: normal;letter-spacing: 0.544px;caret-color: rgb(255, 0, 0);line-height: 1.75em;text-indent: 0em;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;"><a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzI1NDQ3MjQxNA==&mid=2247495111&idx=1&sn=ff4ea52a64be6608bfcc20cd444ccc5a&chksm=e9c61476deb19d60d31a8c463c00c450fa5ab360e6f11abf1628a4eea74a675bbd6c972b237b&scene=21#wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;">4、阿里一面:如何保障消息100%投递成功、消息幂等性?</a></span></p><p style="margin-top: 10px;margin-bottom: 10px;font-size: 15px;font-variant-numeric: normal;font-variant-east-asian: normal;letter-spacing: 0.544px;caret-color: rgb(255, 0, 0);line-height: 1.75em;text-indent: 0em;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;">5<a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzI1NDQ3MjQxNA==&mid=2247494984&idx=1&sn=5b0d2e79176d4b99f2e9c49a2bb40cb3&chksm=e9c614f9deb19defa829cb1657d055503e4f612be0651c2fbaa208bd96ad63e6ee9f1acdaeb0&scene=21#wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;">、</a><a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzI1NDQ3MjQxNA==&mid=2247495066&idx=1&sn=b5e3f8712a0a553437353ae8d09a23bc&chksm=e9c6142bdeb19d3dbeeb31aa48efc88539f1921c4abef821762b06846b23b81226537697adb2&scene=21#wechat_redirect" data-itemshowtype="0" tab="innerlink" data-linktype="2" hasload="1" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;">记住!看小电影前一定要检查一下域名是不是 HTTPS 的,不然....</a></span><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;text-indent: 0em;"></span></p></h4></pre></pre></pre> </section> </section> </section> </section> </section> </section> </section> </section> </section> </section> <section style="white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);margin-left: 0px;margin-right: 0px;"> <span style="letter-spacing: 0.544px;color: rgb(178, 178, 178);font-family: Optima-Regular, PingFangTC-light;font-size: 12px;">作者 | 请叫我小思<br></span> </section> <section style="white-space: normal;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);margin-left: 0px;margin-right: 0px;"> <span style="letter-spacing: 0.544px;color: rgb(178, 178, 178);font-family: Optima-Regular, PingFangTC-light;font-size: 12px;">来源 |<span style="letter-spacing: 0.544px;white-space: pre-line;"> https://blog.csdn.net/zeal9s/article/details/83544074</span></span> </section> <h3 style="margin: 25px 0px;white-space: normal;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"><span style="font-size: 15px;">显示工具条</span></h3> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;"><strong style="color: rgb(53, 179, 120);">(1)效果图</strong></span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);text-align: center;"> <img class="rich_pages" data-ratio="0.5328125" data-s="300,640" data-type="jpeg" data-w="1280" src="/upload/7f85e7f89ecd620f5a261cf991cd2d57.jpg" style="box-sizing: border-box !important;width: 590px !important;visibility: visible !important;"> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;"><strong style="color: rgb(53, 179, 120);">(2)设置方法</strong><br></span> </section> <ul class="list-paddingleft-2" style="width: 577.422px;white-space: normal;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);margin-left: 0px;margin-right: 0px;"> <li style="font-size: 15px;"> <section style="margin-top: 25px;margin-bottom: 25px;line-height: 26px;color: rgb(1, 1, 1);"> <span style="font-size: 15px;">标注1:View–>Toolbar</span> </section></li> <li style="font-size: 15px;"> <section style="margin-top: 25px;margin-bottom: 25px;line-height: 26px;color: rgb(1, 1, 1);"> <span style="font-size: 15px;">标注2:View–>Tool Buttons</span> </section></li> </ul> <h3 style="margin: 25px 0px;white-space: normal;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"><span style="font-size: 15px;">设置鼠标悬浮提示</span></h3> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;"><strong style="color: rgb(53, 179, 120);">(1)效果图</strong></span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);text-align: center;"> <img class="rich_pages" data-ratio="0.5328125" data-s="300,640" data-type="jpeg" data-w="1280" src="/upload/5210c95b5f71a704b7e743567771072.jpg" style="box-sizing: border-box !important;width: 590px !important;visibility: visible !important;"> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;"><strong style="color: rgb(53, 179, 120);">(2)设置方法</strong> </span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;">File–>settings–>Editor–>General–>勾选Show quick documentation…<br></span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);text-align: center;"> <a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzI1NDQ3MjQxNA==&mid=2247495164&idx=1&sn=a547a6f4cf5ccc24010f2e9c40906e3a&chksm=e9c6144ddeb19d5b4e5b824c4cef656e33bc77786b93a14a64b7e70eb253a331d623a0aae5fc&scene=21#wechat_redirect" textvalue="你已选中了添加链接的内容" data-itemshowtype="0" tab="innerlink" data-linktype="1"><span class="js_jump_icon h5_image_link" data-positionback="static" style="inset: auto;margin: 0px;"><img class="rich_pages" data-ratio="0.32040472175379425" data-s="300,640" data-type="jpeg" data-w="593" src="/upload/7e51d9e2f88891baba3595a1483346d7.jpg" style="box-sizing: border-box !important;width: 590px !important;visibility: visible !important;margin: 0px;"></span></a> </section> <h3 style="margin: 25px 0px;white-space: normal;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"><span style="font-size: 15px;">显示方法分隔符<br></span></h3> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;"><strong style="color: rgb(53, 179, 120);">(1)效果图</strong></span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);text-align: center;"> <img class="rich_pages" data-ratio="0.4909310761789601" data-s="300,640" data-type="jpeg" data-w="827" src="/upload/5b7c136d9ab5f0904c1b92938e7833d9.jpg" style="box-sizing: border-box !important;width: 590px !important;visibility: visible !important;"> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;"><strong style="color: rgb(53, 179, 120);">(2)设置方法</strong><br></span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;">File–>settings–>Editor–>Appearance–>勾选</span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);text-align: center;"> <img class="rich_pages" data-ratio="0.2627627627627628" data-s="300,640" data-type="jpeg" data-w="666" src="/upload/ae30ce58b5bdcdf87fbc6902bcd2436e.jpg" style="box-sizing: border-box !important;width: 590px !important;visibility: visible !important;"> </section> <h3 style="margin: 25px 0px;white-space: normal;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"><span style="font-size: 15px;">忽略大小写提示</span></h3> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;"><strong style="color: rgb(53, 179, 120);">(1)效果图</strong> </span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;">备注:idea的默认设置是严格区分大小写提示的,例如输入string不会提示String,不方便编码</span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);text-align: center;"> <img class="rich_pages" data-ratio="0.3671875" data-s="300,640" data-type="jpeg" data-w="1280" src="/upload/df04ad578121dfdf285f36714a4db9ac.jpg" style="box-sizing: border-box !important;width: 590px !important;visibility: visible !important;"> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;"><strong style="color: rgb(53, 179, 120);">(2)设置方法</strong></span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;"> File–>settings–>Editor–>General -->Code Completion --></span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);text-align: center;"> <img class="rich_pages" data-ratio="0.6141396933560477" data-s="300,640" data-type="jpeg" data-w="1174" src="/upload/982907440a71e6c5e03121645d4ccdbc.jpg" style="box-sizing: border-box !important;width: 590px !important;visibility: visible !important;"> </section> <h3 style="margin: 25px 0px;white-space: normal;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"><span style="font-size: 15px;">主题设置<br></span></h3> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;"><strong style="color: rgb(53, 179, 120);">(1)效果图</strong> </span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;">备注:有黑白两种风格</span> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);text-align: center;"> <img class="rich_pages" data-ratio="0.534375" data-s="300,640" data-type="jpeg" data-w="1280" src="/upload/d78ec5affddecae808c267a0e26906b7.jpg" style="background-color: rgb(238, 237, 235);border-width: 1px;border-style: solid;border-color: rgb(238, 237, 235);background-size: 22px;background-position: center center;background-repeat: no-repeat;height: 290.252px !important;box-sizing: border-box !important;width: 542px !important;"> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);text-align: center;"> <a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzI1NDQ3MjQxNA==&mid=2247495111&idx=1&sn=ff4ea52a64be6608bfcc20cd444ccc5a&chksm=e9c61476deb19d60d31a8c463c00c450fa5ab360e6f11abf1628a4eea74a675bbd6c972b237b&scene=21#wechat_redirect" textvalue="你已选中了添加链接的内容" data-itemshowtype="0" tab="innerlink" data-linktype="1"><span class="js_jump_icon h5_image_link" data-positionback="static" style="inset: auto;margin: 0px;"><img class="rich_pages" data-ratio="0.53203125" data-s="300,640" data-type="jpeg" data-w="1280" src="/upload/ace0164f0cfd524f3e87f03b860b5381.jpg" style="background-color: rgb(238, 237, 235);border-width: 1px;border-style: solid;border-color: rgb(238, 237, 235);background-size: 22px;background-position: center center;background-repeat: no-repeat;height: 288.985px !important;box-sizing: border-box !important;width: 542px !important;margin: 0px;"></span></a> </section> <section style="margin: 25px 0px;white-space: normal;min-height: 1em;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);"> <span style="font-size: 15px;"><strong style="color: rgb(53, 179, 120);">�
作者:微信小助手
<p style="text-align: center;" data-mpa-powered-by="yiban.io"><br></p> <p style="max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;color: rgb(0, 0, 0);font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 14px;background-color: rgb(255, 255, 255);text-align: center;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br></p> <section style="max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;color: rgb(0, 0, 0);font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 14px;background-color: rgb(255, 255, 255);text-align: center;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <span style="max-width: 100%;color: rgb(255, 0, 0);font-size: 19px;box-sizing: border-box !important;overflow-wrap: break-word !important;">一<strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">、基础</strong></span> </section> <section style="max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;color: rgb(0, 0, 0);font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 14px;text-align: left;background: white;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">1、说明:创建数据库<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: teal;box-sizing: border-box !important;overflow-wrap: break-word !important;">CREATE DATABASE database-name</span></strong> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">2</strong> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">、说明:删除数据库<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">drop database dbname</span></strong> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">3、说明:备份sql server<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: teal;box-sizing: border-box !important;overflow-wrap: break-word !important;">--- 创建 备份数据的 device<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">USE master<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat'<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">--- 开始 备份<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">BACKUP DATABASE pubs TO testBack</span></strong> <span style="max-width: 100%;color: teal;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">4、说明:创建新表<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(153, 51, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;">create table tabname(col1 type1 [not null] [primary key],col2 type2 [not null],..</span><span style="max-width: 100%;color: teal;box-sizing: border-box !important;overflow-wrap: break-word !important;">)</span></strong> </section> <section style="max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;color: rgb(0, 0, 0);font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 14px;text-align: left;background-color: rgb(255, 255, 255);line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"> </section> <section style="max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;color: rgb(0, 0, 0);font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 14px;text-align: left;background: white;line-height: 2em;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">根据已有的表创建新表: </strong> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">A:create table tab_new like tab_old (使用旧表创建新表)</span></strong> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">B</strong></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">:create table tab_new as select col1,col2… from tab_old definition only</span></strong> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">5、说明:删除新表<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: maroon;box-sizing: border-box !important;overflow-wrap: break-word !important;">drop table tabname</span></strong> <span style="max-width: 100%;color: teal;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">6、说明:增加一个列<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">Alter table tabname add column col type</span></strong> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: red;box-sizing: border-box !important;overflow-wrap: break-word !important;">注</span></strong>:列增加后将不能删除。DB2中列加上后数据类型也不能改变,唯一能改变的是增加varchar类型的长度。 <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">7、说明:添加主键</strong>: <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: teal;box-sizing: border-box !important;overflow-wrap: break-word !important;">Alter table tabname add primary key(col) <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span></strong> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">说明:删除主键</span>: <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: maroon;box-sizing: border-box !important;overflow-wrap: break-word !important;"> Alter table tabname drop primary key(col) </span></strong> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">8、说明:创建索引</strong>: <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">create [unique] index idxname on tabname(col….) <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span></strong> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">删除索引</span>: <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">drop index idxname</span></strong> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">注:索引是不可更改的,想更改必须删除重新建。</span> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">9</strong> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">、说明:创建视图</strong>: <span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">create view viewname as select statement </span> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">删除视图</strong>: <span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">drop view viewname</span> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">10</strong> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">、说明:几个简单的基本的sql语句<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">选择:</span></strong> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">select * from table1 where 范围<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">插入:</span></strong> <span style="max-width: 100%;color: rgb(153, 51, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">insert into table1(field1,field2) values(value1,value2)<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">删除:</span></strong> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">delete from table1 where 范围</span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">更新</span></strong> <span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">:</span> <span style="max-width: 100%;color: rgb(153, 51, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">update table1 set field1=value1 where 范围<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">查找</span></strong> <span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">:</span> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">select * from table1 where field1 like ’%value1%’ ---like的语法很精妙,查资料!<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">排序</span></strong> <span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">:</span> <span style="max-width: 100%;color: rgb(153, 51, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">select * from table1 order by field1,field2 [desc]<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">总数</span></strong> <span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">:</span> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">select count as totalcount from table1<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">求和</span></strong> <span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">:</span> <span style="max-width: 100%;color: rgb(153, 51, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">select sum(field1) as sumvalue from table1<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">平均</span></strong> <span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">:</span> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">select avg(field1) as avgvalue from table1<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">最大</span></strong> <span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">:</span> <span style="max-width: 100%;color: rgb(153, 51, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">select max(field1) as maxvalue from table1<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">最小</span></strong> <span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">:</span> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">select min(field1) as minvalue from table1<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">11、说明:几个高级查询运算词<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">A: <span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">UNION 运算符</span></strong> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">UNION 运算符通过组合其他两个结果表(例如 TABLE1 和 TABLE2)并消去表中任何重复行而派生出一个结果表。当 ALL 随 UNION 一起使用时(即 UNION ALL),不消除重复行。两种情况下,派生表的每一行不是来自 TABLE1 就是来自 TABLE2</span>。 <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">B:EXCEPT 运算符 <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span>EXCEPT</strong> <span style="max-width: 100%;color: rgb(153, 51, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">运算符通过包括所有在 TABLE1 中但不在 TABLE2 中的行并消除所有重复行而派生出一个结果表。当 ALL 随 EXCEPT 一起使用时 (EXCEPT ALL),不消除重复行。</span> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: green;box-sizing: border-box !important;overflow-wrap: break-word !important;">C:INTERSECT </span>运算符<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">INTERSECT</strong> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">运算符通过只包括 TABLE1 和 TABLE2 中都有的行并消除所有重复行而派生出一个结果表。当 </span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">ALL</strong> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">随 INTERSECT 一起使用时 (INTERSECT ALL),不消除重复行。 <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: red;box-sizing: border-box !important;overflow-wrap: break-word !important;">注:</span></strong> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">使用运算词的几个查询结果行必须是一致的</span>。 <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">12</strong> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">、说明:使用外连接 <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></strong>A、 <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">left (outer) join</strong>: <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">左 <span style="max-width: 100%;color: rgb(153, 51, 102);box-sizing: border-box !important;overflow-wrap: break-word !important;">外连接(左连接):结果集几包括连接表的匹配行,也包括左连接表的所有行。 <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">SQL: select a.a, a.b, a.c, b.c, b.d, b.f from a LEFT OUT JOIN b ON a.a = b.c<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">B:right (outer) join: </strong> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">右外连接(右连接):结果集既包括连接表的匹配连接行,也包括右连接表的所有行。 <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"></span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">C:full/cross (outer) join</strong>: <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <span style="max-width: 100%;color: rgb(153, 51, 0);box-sizing: border-box !important;overflow-wrap: break-word !important;">全外连接:不仅包括符号连接表的匹配行,还包括两个连接表中的所有记录。</span> <br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">12</strong> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">、分组<span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">:Group by:<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> </span></strong> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow-wrap: break-word !important;">一张表,一旦分组 完成后,查询后只能得到组相关的信息。<br style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"> </span> <strong style="max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: maroon;box-sizing: border-box !important;overflow-wrap: break-word !important;">组相关的信息:</span></strong> <span style="max-width: 100%;color: blue;box-sizing: border-box !important;overflow
作者:じ☆ve不哭
> 公司安装了一块巨屏在大厅,老板让投大数据展示公司实力。 于是,好东西要分享,适合二次开发以及高手加入后台。  https://studyjava.lanzous.com/iqPm6mrnbtc 密码: java 原文链接:https://www.52pojie.cn/thread-1386836-1-1.html
作者:cdhqyj
目前主流的计算机语言有java,c++,R,python等等,开发语言是开发者必须熟练掌握的“碗筷”。很多人都选择开发比较便捷的java,那么就来分析一下java语言的特点有哪些。 java语言的特点有哪些? 1、java是目前使用最为广泛的网络编程语言之一 它不仅吸收了C++语言的各种优点,还摒弃了C++里难以理解的多继承、指针等概念,因此java语言具有功能强大和简单易用两个特征。java语言作为静态面向对象编程语言的代表,极好地实现了面向对象理论,允许程序员以优雅的思维方式进行复杂的编程。 2、java有许多特性 java具有简单性、面向对象、分布式、健壮性、安全性、平台独立与可移植性、多线程、动态性等特点。 3、java拥有极高的跨平台能力 java可以编写桌面应用程序、Web应用程序、分布式系统和嵌入式系统应用程序等与传统的编程语言,如C、C++相比,java能够更加容易上手,而比之微软平台的开发语言,如VB、MFC等,则有着跨平台运行的能力,尽管java没有能够完全实现最初的一次编程、随处运行的口号,但是java相比於其它较早的编程语言,仍然拥有极高的跨平台能力。 4、java是一个强类型语言 java是一个强类型语言,它允许扩展编译时检查潜在类型不匹配问题的功能。java要求显式的方法声明,它不支持C风格的隐式声明。这些严格的要求保证编译程序能捕捉调用错误,这就导致更可靠的程序。可靠性方面最重要的增强之一是java的存储模型。 5、不支持指针消除重写存储和讹误数据的可能性 java不支持指针,它消除重写存储和讹误数据的可能性。类似地,java自动的“无用单元收集”预防存储漏泄和其它有关动态存储分配和解除分配的有害错误。java解释程序也执行许多运行时的检查,诸如验证所有数组和串访问是否在界限之内。 6、java的异常处理使得系统更稳定 异常处理是java中使得程序更稳健的另一个特征。异常是某种类似于错误的异常条件出现的信号。使用try/catch/finally语句,程序员可以找到出错的处理代码,这就简化了出错处理和恢复的任务。 以上就是Java语言的几大特点。虽然编程语言有很多种,但Java语言的运用还是很广泛的。
作者:微信小助手
<section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;padding-right: 10px;padding-left: 10px;word-break: break-word;overflow-wrap: break-word;text-align: left;margin-top: -10px;line-height: 1.25;color: rgb(43, 43, 43);font-family: Optima-Regular, Optima, PingFangTC-Light, PingFangSC-light, PingFangTC-light;letter-spacing: 2px;background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.04) 3%, rgba(0, 0, 0, 0) 3%), linear-gradient(360deg, rgba(50, 0, 0, 0.04) 3%, rgba(0, 0, 0, 0) 3%);background-size: 20px 20px;background-position: center center;"> <h3 data-tool="mdnice编辑器" style="color: black;font-size: 17px;font-weight: bold;text-align: center;margin-top: 20px;margin-bottom: 20px;"><span style="display: none;"></span><span style="border-bottom: 2px solid RGBA(79, 177, 249, .65);color: #2b2b2b;padding-bottom: 2px;"><span style="width: 30px;height: 30px;display: block;background-image: url("https://mmbiz.qpic.cn/sz_mmbiz_png/zTfAIs5rNXiajlShmOBdxgxXDUkof9TiaPTf73XrIrBQ95VNDQXwHEtibu48rQqkAO1Fu7dez7228P9jvicjnHcOWQ/640?wx_fmt=png");background-position: center center;background-size: 30px;margin: auto auto -8px;opacity: 1;background-repeat: no-repeat;"></span>持续坚持原创输出,点击蓝字关注我吧</span><span style="display: none;"></span></h3> <p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.4255555555555556" data-s="300,640" src="/upload/ba13e96ff3bb44519de1256d87e92be4.png" data-type="png" data-w="900" style=""></p> <p><span style="max-width: 100%;font-family: Optima-Regular, Optima, PingFangTC-Light, PingFangSC-light, PingFangTC-light;letter-spacing: 2px;text-align: left;color: rgb(136, 136, 136);font-size: 12px;word-spacing: 2px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;">作者:小傅哥</span><br style="max-width: 100%;color: rgb(43, 43, 43);font-family: Optima-Regular, Optima, PingFangTC-Light, PingFangSC-light, PingFangTC-light;letter-spacing: 2px;text-align: left;white-space: normal;font-size: 14px;word-spacing: 2px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-family: Optima-Regular, Optima, PingFangTC-Light, PingFangSC-light, PingFangTC-light;letter-spacing: 2px;text-align: left;color: rgb(136, 136, 136);font-size: 12px;word-spacing: 2px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;">博客:https://bugstack.cn</span><span style="border-bottom: 2px solid RGBA(79, 177, 249, .65);color: #2b2b2b;padding-bottom: 2px;"></span><br></p> <blockquote data-tool="mdnice编辑器" style="font-size: 0.9em;overflow: auto;padding: 10px 10px 10px 20px;margin-bottom: 20px;margin-top: 20px;text-size-adjust: 100%;line-height: 1.55em;border-radius: 6px;color: rgb(89, 89, 89);box-sizing: inherit;border-width: 1px;border-top-style: solid;border-right-style: solid;border-bottom-style: solid;border-color: rgba(64, 184, 250, 0.4);background: rgba(64, 184, 250, 0.1);"> <span style="color: RGBA(64, 184, 250, .5);font-size: 34px;line-height: 1;font-weight: 700;">❝</span> <p style="padding-top: 8px;padding-bottom: 8px;font-size: 14px;word-spacing: 2px;line-height: 26px;">沉淀、分享、成长,让自己和他人都能有所收获!😜</p> <span style="float: right;color: RGBA(64, 184, 250, .5);">❞</span> </blockquote> </section> <section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: -apple-system, system-ui, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;"> <h1 data-tool="mdnice编辑器" style="font-weight: bold;font-size: 24px;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);margin-top: 30px;margin-bottom: 10px;text-align: center;"><span style="font-size: 22px;display: block;margin-top: -36px;">目录</span></h1> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;"><br></p> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-2"> <li><p>一、前言</p></li> <li><p>二、为什么建中台?</p></li> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;list-style-type: square;" class="list-paddingleft-2"> <li style="list-style: circle;"><p>1. 什么时候热的</p></li> <li style="list-style: circle;"><p>2. 怎么就热了呢</p></li> <li style="list-style: circle;"><p>3. 中台从哪来的</p></li> </ul> <li><p>三、建了哪些中台?</p></li> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;list-style-type: square;" class="list-paddingleft-2"> <li style="list-style: circle;"><p>1. 技术中台</p></li> <li style="list-style: circle;"><p>2. 数据中台</p></li> <li style="list-style: circle;"><p>3. 业务中台</p></li> </ul> <li><p>四、刚建好又要拆?</p></li> <ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;list-style-type: square;" class="list-paddingleft-2"> <li style="list-style: circle;"><p>1. 新需求响应难度增加</p></li> <li style="list-style: circle;"><p>2. 服务集成复杂度增加</p></li> <li style="list-style: circle;"><p>3. 可复用实现难度增加</p></li> </ul> <li><p>五、总结</p></li> <li><p>六、系列推荐</p></li> </ul> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;"><br></p> <h2 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);font-size: 20px;"><span style="display: none;"></span><span style="border-left: 4px solid;padding-left: 10px;">一、前言</span></h2> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;"><code style="font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;">离数学越远代码,价值越低!</code></p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;margin-top: 16px;">代码编程是对数学逻辑的具体实现,就相当于用砖头盖个厕所、码个猪圈、砌出个砖墙等是一样,砖还是那批<code style="font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;">5毛钱</code>的砖,但盖在哪里盖出了啥价值就不一样了!</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;margin-top: 16px;">程序员也一样,你码的砖是公司里的;核心组件、通用模块、高并发业务还是一些ERP查询、接口包壳、屎山寻宝呢?通常那些复杂的业务逻辑或者具备一定技术深入的核心组件,才是最让人程序员快速成长的地方。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;margin-top: 16px;">当然有些时候没有办法,不是不想做而是没得机会,或是因为初入职场、或是由于部门较差、也可能更多的是当前自身能力不足等等。但终究成长是自己事情,有了方向<code style="font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;">快是最大的障碍</code>,脚踏实地把自己武装起来,才有谈判的机会!</p> <h2 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);font-size: 20px;"><span style="display: none;"></span><span style="border-left: 4px solid;padding-left: 10px;">二、为什么建中台?</span></h2> <h3 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);"><span style="display: none;"></span>1. 什么时候热的<span style="display: none;"></span></h3> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;">通过百度指数搜索<code style="font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;">中台</code>关键词,发现它是从<code style="font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;">19年5月21日</code>突然热起来的,如下图;</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <img data-ratio="0.41321044546851" src="/upload/b40801bfa267bb2d3fe14ce2214973d2.png" data-type="png" data-w="1302" style="display: block;margin-right: auto;margin-left: auto;"> </figure> <ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-2"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 百度指标搜索:http://index.baidu.com/v2/main/index.html#/trend/%E4%B8%AD%E5%8F%B0?words=%E4%B8%AD%E5%8F%B0 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 19年以前也并不是没有中台一词,只不过到了这一天像是被神化了一样,各个公司都要搞中台,被评论成 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;word-break: break-all;">上中台找死,不上中台等死!</code> </section></li> </ul> <h3 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);"><span style="display: none;"></span>2. 怎么就热了呢<span style="display: none;"></span></h3> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;">说来奇怪怎么<code style="font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;">中台</code>就热了呢,发生了啥?</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <img data-ratio="0.5416666666666666" src="/upload/89cc72df1315ee2d27047b87d79de7d0.png" data-type="png" data-w="840" style="display: block;margin-right: auto;margin-left: auto;"> </figure> <ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-2"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 啊!怪不得,是流量大佬腾讯于 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;word-break: break-all;">19年5月21</code>日召开了全球数字生态大会,会议上腾讯高级副总裁 <code style="font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;word-break: break-all;">汤道生</code>提出“开放中台能力,助力产业升级”。 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 原文:腾讯汤道生:腾讯开放中台能力 助力产业升级 </section></li> </ul> <h3 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);"><span style="display: none;"></span>3. 中台从哪来的<span style="display: none;"></span></h3> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;">你玩过<code style="font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;">《海盗奇兵》</code>吗?那<code style="font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;">《部落冲突》</code>、<code style="font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;">《皇室战争》</code>呢?<span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">咋滴,玩游戏还和中台有关系?</span></p> <p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="0.75" data-s="300,640" src="/upload/9bf6717766bd90c474442421bba3e905.png" data-type="png" data-w="1280" style=""></p> <ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-2"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> supercell(超级细胞),芬兰移动游戏巨头。拥有《部落冲突》、《卡通农场》、《海岛奇兵》、《皇室战争》和《荒野乱斗》 [1] 等全球热门游戏。 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 芬兰移动游戏巨头supercell在2016年3月宣布,公司旗下游戏每日活跃用户(DAU)人数已经突破1亿。这家公司的CEO埃卡·潘纳宁(Ilkka Paananen)在推特上分享了这个消息,并向全球玩家表示感谢。 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 在Supercell,每个独立游戏开发团队,称为“细胞”团队,核心人员通常只有5人,最多也不会超过7人。员工虽然少,但都是行业顶尖人才,还有充分的自由度。 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 团队自己决定做什么样的产品,然后最快时间推出产品公测版,看看游戏是否受用户欢迎。如果用户不欢迎,迅速放弃这个产品,再进行新的尝试,期间几乎没有管理角色的介入。 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 团队研发的产品失败后,不但不会受到惩罚,甚至还会举办庆祝仪式,以庆祝他们从失败中学到了东西。 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 2015年年中,马云带领阿里巴巴集团高管,拜访了位于芬兰赫尔辛基的移动游戏公司Supercell。 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 腾讯控股与其他参与财团已于2016年6月21日下午6点左右(北京时间)发布最新消息,确认已同意透过买方(财团的全资附属公司)收购Supercell的大部分股权。 </section></li> </ul> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;"><span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">综上</span>,一个马老板收购了大部分股权,另一个马老板从 Supercell 团队开发模式,闻到<span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">中台</span>的味道,<code style="font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;">细胞和部落</code> 对应 <code style="font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;">小前台和大中台</code>,至此半年后每一个程序员都被中台洗礼了。</p> <h2 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);font-size: 20px;"><span style="display: none;"></span><span style="border-left: 4px solid;padding-left: 10px;">三、建了哪些中台?</span></h2> <h3 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);"><span style="display: none;"></span>1. 技术中台<span style="display: none;"></span></h3> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <img data-ratio="0.692822966507177" src="/upload/3f7b6c50006077f0b685660515146058.png" data-type="png" data-w="1045" style="display: block;margin-right: auto;margin-left: auto;"> </figure> <ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-2"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">难度</span>:⭐⭐⭐⭐ </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">描述</span>:技术中台提供了建设系统所需的基础设施、开发环境、数据服务、分布式能力等各类底层技术问题,同时技术中台有时也涵盖了研发中台的概念,主要是为了帮助工程的快速搭建、测试、集成、交付、运维、监控等。 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">备注</span>:技术中台基本是每个公司必备的,但可能每个公司会有多套测试环境、预发环境、上线环境,以及各类技术组件存在多套。建设中台的时候需要把这些能力进行整合,统一建设,统一维护。 </section></li> </ul> <h3 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);"><span style="display: none;"></span>2. 数据中台<span style="display: none;"></span></h3> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <img data-ratio="0.6676190476190477" src="/upload/ae7526fcbd0b9c6a7b254e97e1c75565.png" data-type="png" data-w="1050" style="display: block;margin-right: auto;margin-left: auto;"> </figure> <ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-2"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">难度</span>:⭐⭐⭐⭐ </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">描述</span>:数据中台提供数据采集、运算、分析、算法等数据动作,并提供相应的数据服务;量化指标、人群标签、知识图谱、业务报表等。 </section></li> </ul> <h3 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);"><span style="display: none;"></span>3. 业务中台<span style="display: none;"></span></h3> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <img data-ratio="0.5617647058823529" src="/upload/231ae13ed15baabaf19cc3bc0e11db39.png" data-type="png" data-w="1360" style="display: block;margin-right: auto;margin-left: auto;"> </figure> <ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-2"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">难度</span>:⭐⭐⭐⭐⭐ </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">描述</span>:业务中台提供可复用的服务能力,例如:交易、支付、活动、用户、订单等,这些服务可以标准化、简单化、统一化。 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">备注</span>:中台最想也最难的就是对业务中台的处理,支持浅了满足不了业务诉求、支持深了又太个性化满足不了所有需求。同时每一块业务拆分时可不只是系统,还有相应的业务、产品、运营,他们该如何提需求又提给谁。提的太复杂中台做不了,给后台做,做多了又想着平台化了。所以这也是最难的一块! </section></li> </ul> <h2 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);font-size: 20px;"><span style="display: none;"></span><span style="border-left: 4px solid;padding-left: 10px;">四、刚建好又要拆?</span></h2> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;">原来是建中台火,现在突然变成拆中台了。如果不是阿里自己说要拆中台,可能其他人也不敢说!</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;margin-top: 16px;">拆中台的起因是阿里内网说中台太厚了,影响到业务发展和敏捷响应能力。为啥这么说呢?</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;"> <img data-ratio="0.8072487644151565" src="/upload/1addb8d94a1408d710c34799c8585a9c.png" data-type="png" data-w="607" style="display: block;margin-right: auto;margin-left: auto;"> </figure> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;"><span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">说白了</span>,中台、低代码这些概念的指导结果,都是为了通用性服务的组装和编排。对于创新型颠覆式的需要快速试错的业务场景,就不太容易使用中台搭建。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;margin-top: 16px;">但中台很适合类似盒马这样的场景诞生,有用户、有订单、有支付、有营销一整套的服务在中台都可以支撑,对于快速建设同类服务就变得非常容易。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;margin-top: 16px;">可一些创新性,中台不具备或者不完全具备的服务,在通过前台、中台、后台,就变得非常困难,所有的需求没得把中台击穿就已经错过了市场。所以说中台太厚了,要拆中台。</p> <h3 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);"><span style="display: none;"></span>1. 新需求响应难度增加<span style="display: none;"></span></h3> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;">当中台为了通用性、共用性、平台性的原则建设新需求的时候,实际对业务响应的敏捷度就是下降的。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;margin-top: 16px;">这包括一个新需求,不需要你的流程太长、也不需要你的通用性、甚至可能不需要你做完整的分库分表、数据采集、接口通用等等,如果你都按照中台的方式建设,那么这一个小需求的整体时间成本都将翻倍。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;margin-top: 16px;">所以当这样的需求越来越多以后,你会发现建设的中台并没有沉淀下可复用的服务,这些服务最终后被前台系统沉淀下来。本来希望是中台做的厚一些,现在看是前台变得更厚了,前台对中台的依赖也越来越小了。<em>这主要是因为前台离需求变化最近,敏锐度最高</em></p> <h3 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);"><span style="display: none;"></span>2. 服务集成复杂度增加<span style="display: none;"></span></h3> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;">中台提供了大量可复用的接口,但一个需求的实现会需要很多中台的接口集成,最终因为这些接口串联、组合、调试都过于冗长,使得效率不增反降。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;margin-top: 16px;">原本一个需求由一个组可以实现,现在依赖中台需要很多组开会、协同、排期,严重拖慢了交付的进度,同时也不一定能提高交付质量。</p> <h3 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);"><span style="display: none;"></span>3. 可复用实现难度增加<span style="display: none;"></span></h3> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;">如果为了可复用则需要把一个需求放大,考虑它会发展成什么样,将来要扩展出哪些功能,留出什么样的口子,打哪种地基建设。基于各项的考虑把各类支撑需求的服务抽象化、去业务化,提取共性支撑业务组装。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;margin-top: 16px;">这就像中间件的建设是为了屏蔽底层差异化一样,而你屏蔽的时候各类业务的差异化,而一个业务需求的变更都可能会影响到实际抽离出的业务组件该如何支撑。如果因为中台的通用性不能支持差异化需求,那么这类需求就会被建设在前台。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;margin-top: 16px;">所以一个公司原本就没有很深、很广、很足的业务场景覆盖度,那么中台的建设会成为需求的绊脚石,投入的人力也将增大,每一次需要构建和完善时也会成为中台建设的灾难。</p> <h2 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);font-size: 20px;"><span style="display: none;"></span><span style="border-left: 4px solid;padding-left: 10px;">五、总结</span></h2> <ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-2"> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 综上我们看到中台并不是没有益处,但也不是什么都能干。只是离业务太远就追不上业务的变化,离的太近有靠近前台,所以现在希望把中台做的薄一些,能快速的支撑业务发展和敏捷为导向。 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 如果公司没有那么个需求和实力,就算想建中台也不要一下步子太大,最后可能中台建完了,公司受不了了。阿里拆中台拆也不是完全的拆,因为已经有中台可以很好支撑的场景了,那么需要快速变化的场景可以交给业务团队。 </section></li> <li> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> 无论是中台、低代码,相对于个人技术成长来说,都是看你在每一场技术游戏中,承担了什么角色、留下了什么价值,不会有永远稳定一成不变的技术组织,只需要关心在变化中不断积累个人成长所需的知识。 </section></li> </ul> <h2 data-tool="mdnice编辑器" style="font-weight: bold;padding-top: 30px;padding-bottom: 30px;color: rgb(19, 92, 224);font-size: 20px;"><span style="display: none;"></span><span style="border-left: 4px solid;padding-left: 10px;">六、系列推荐</span></h2> <ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-2"> <li style="color: rgb(41, 109, 197);"> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzIxMDAwMDAxMw==&mid=2650730198&idx=1&sn=ee7a1dfe52e464a50af24ad35ac5ff6c&chksm=8f610f34b816862258b07068bd792a88c922656137310e8a7cf6a6ebe50e22b386ccbe5d834a&scene=21#wechat_redirect" textvalue="方案设计:基于IDEA插件开发和字节码插桩技术,实现研发交付质量自动分析" data-itemshowtype="0" tab="innerlink" style="color: rgb(41, 109, 197);" data-linktype="2"><span style="color: rgb(41, 109, 197);">方案设计:基于IDEA插件开发和字节码插桩技术,实现研发交付质量自动分析</span></a> </section></li> <li style="color: rgb(41, 109, 197);"> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzIxMDAwMDAxMw==&mid=2650730209&idx=1&sn=e58a2c540a0621c0c9944eed2c793d92&chksm=8f610f03b816861514aeae1105413c0ef64bf4f357dcec8f9c6a4fb37b7c9226ce83b15c65f4&scene=21#wechat_redirect" textvalue="技术扫盲:关于低代码编程的可持续性交付设计和分析" data-itemshowtype="0" tab="innerlink" style="color: rgb(41, 109, 197);" data-linktype="2"><span style="color: rgb(41, 109, 197);">技术扫盲:关于低代码编程的可持续性交付设计和分析</span></a> </section></li> <li style="color: rgb(41, 109, 197);"> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzIxMDAwMDAxMw==&mid=2650730238&idx=1&sn=be97da23ef05e7533eeb0ae5e7ec89a0&chksm=8f610f1cb816860aed9f296f2c3969d285f34b6f938f458e005290844fdcab73394be82428c1&scene=21#wechat_redirect" textvalue="工作两三年了,整不明白架构图都画啥?" data-itemshowtype="0" tab="innerlink" style="color: rgb(41, 109, 197);" data-linktype="2"><span style="color: rgb(41, 109, 197);">工作两三年了,整不明白架构图都画啥?</span></a> </section></li> <li style="color: rgb(41, 109, 197);"> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzIxMDAwMDAxMw==&mid=2650730288&idx=1&sn=f9080f6377a5139e15981ff6d9fe8663&chksm=8f610ed2b81687c4a1101209da5efa4b3ad78e2ce61e19c62998ea2131d38d937beb8c3cb424&scene=21#wechat_redirect" textvalue="不重复造轮子都是骗小孩的,教你手撸 SpringBoot 脚手架!" data-itemshowtype="0" tab="innerlink" style="color: rgb(41, 109, 197);" data-linktype="2"><span style="color: rgb(41, 109, 197);">不重复造轮子都是骗小孩的,教你手撸 SpringBoot 脚手架!</span></a> </section></li> <li style="color: rgb(41, 109, 197);"> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzIxMDAwMDAxMw==&mid=2650730171&idx=1&sn=cd27cf4b7df0989300e35db9f6f075b4&chksm=8f610f59b816864f9634e40c20f5ab05aebc7337d2592700fb218f37511245984d60e0f2295c&scene=21#wechat_redirect" textvalue="《Java 面经手册》PDF,全书 417 页 11.5 万字,完稿&发版!" data-itemshowtype="0" tab="innerlink" data-linktype="2"><span style="color: rgb(41, 109, 197);">《Java 面经手册》PDF,全书 417 页 11.5 万字,完稿&发版!</span></a> </section></li> </ul> </section> <section data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: -apple-system, system-ui, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;"> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;text-align: center;"><span style="caret-color: rgb(153, 153, 153);color: rgb(153, 153, 153);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-size: 15px;text-align: center;text-size-adjust: auto;background-color: rgb(255, 255, 255);">- END -<br></span></p> <hr style="border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);"> <p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 2;"><span style="font-family: -apple-system, system-ui, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0px;">下方扫码关注 </span><span style="font-family: -apple-system, system-ui, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">bugstack虫洞栈</span><span style="font-family: -apple-system, system-ui, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0px;">,与小傅哥一起学习成长、共同进步,做一个码场最贵Coder!</span></p> <ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-2"> <li style="color: rgb(91, 91, 91);font-size: 14px;"> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <span style="color: rgb(91, 91, 91);font-size: 14px;">回复【设计模式】,下载《重学Java设计模式》,这是一本互联网真实案例的实践书籍,从实际业务中抽离出,交易、营销、秒杀、中间件、源码等众多场景进行学习代码设计。</span> </section></li> <li style="color: rgb(91, 91, 91);font-size: 14px;"> <section style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 2;"> <span style="color: rgb(91, 91, 91);font-size: 14px;">回复【面经手册】,下载<span style="color: rgb(91, 91, 91);font-family: -apple-system, system-ui, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;text-align: left;">《面经手册 • 拿大厂Offer》</span>,这是一本有深度的Java核心内容,从数据结构、算法、并发编程以及JVM系8不断深入讲解,让懂了就是真的懂。</span> </section></li> </ul> <p style="text-align: center;"><img class="rich_pages js_insertlocalimg" data-ratio="1" data-s="300,640" src="/upload/430388728ca76ed1351b393b6a1b9605.png" data-type="png" data-w="400" style=""></p> <section style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 1.5em;"> <span style="font-size: 12px;"><span style="color: rgb(91, 91, 91);">你好,我是</span><span style="background-image: linear-gradient(to right, rgb(50, 153, 210), rgb(239, 189, 181));background-position: initial;background-size: initial;background-repeat: initial;background-attachment: initial;background-origin: initial;background-clip: initial;color: rgb(255, 255, 255);padding-right: 4px;padding-left: 4px;display: inline-block;border-radius: 4px;margin-right: 2px;margin-left: 2px;letter-spacing: 1px;">小傅哥</span><span style="color: rgb(91, 91, 91);">。一线互联网</span></span> <code style="font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;"><span style="font-size: 12px;">java</span></code> <span style="font-size: 12px;color: rgb(91, 91, 91);">工程师、架构师,开发过交易&营销、写过运营&活动、设计过中间件也倒腾过中继器、IO板卡。不只是写Java语言,也搞过C#、PHP,是一个技术活跃的折腾者。</span> <br> </section> <section style="padding-top: 8px;padding-bottom: 8px;color: black;line-height: 1.5em;"> <span style="font-family: -apple-system, system-ui, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0px;color: rgb(91, 91, 91);font-size: 12px;">2020年写了一本PDF</span> <a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzIxMDAwMDAxMw==&mid=2650727328&idx=1&sn=7d8ed944e7aa9a363da3bf48e50d69dc&chksm=8f610242b8168b54bc1965829327e1d47d1297abf7bb2ca8064ffcceec542e473cfee00ed873&scene=21#wechat_redirect" textvalue="《重学Java设计模式》" data-itemshowtype="0" tab="innerlink" data-linktype="2" style="font-family: -apple-system, system-ui, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0px;color: rgb(41, 109, 197);font-size: 12px;">《重学Java设计模式》</a> <span style="font-family: -apple-system, system-ui, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0px;color: rgb(91, 91, 91);font-size: 12px;">,全网下载量30万+,帮助很多同学成长。同年 github 的两个项目,</span> <code style="letter-spacing: 0px;font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;"><span style="font-size: 12px;">CodeGuide</span></code> <span style="font-family: -apple-system, system-ui, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0px;font-size: 12px;">、</span> <code style="letter-spacing: 0px;font-size: 14px;overflow-wrap: break-word;border-radius: 4px;margin-right: 2px;margin-left: 2px;background-color: rgba(27, 31, 35, 0.05);font-family: "Operator Mono", Consolas, Monaco, Menlo, monospace;color: rgb(19, 148, 216);padding: 2px 6px;word-break: normal;"><span style="font-size: 12px;">itstack-demo-design</span></code> <span style="font-family: -apple-system, system-ui, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0px;font-size: 12px;">,<span style="color: rgb(91, 91, 91);">持续霸榜 Trending,成为全球热门项目。</span></span> </section> </section>
作者:微信小助手
<section powered-by="xiumi.us" style="margin-top: 30px;margin-bottom: 20px;white-space: normal;max-width: 100%;box-sizing: border-box;font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial
作者:微信小助手
<section data-role="outer" label="Powered by 135editor.com" data-mpa-powered-by="yiban.io"> <section mpa-from-tpl="t" style="margin-right: 10px;margin-left: 10px;letter-spacing: 1px;background-color: rgb(255, 255, 255);display: flex;justify-content: center;align-items: center;font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;"> <section mpa-from-tpl="t" style="flex-shrink: 0;width: 48px;height: 43px;z-index: 5;text-align: center;"> <p style="text-align:center;margin-bottom: 15px;letter-spacing: 2px;"><img data-cropselx1="0" data-cropselx2="48" data-cropsely1="0" data-cropsely2="43" data-type="png" height="148" width="143" src="/upload/716d06887d52ee36b12acabfc9ee1eb5.png" style="box-sizing: border-box;vertical-align: middle;visibility: visible !important;width: 29px !important;" data-ratio="1.034965034965035" data-w="143"></p> </section> <section mpa-from-tpl="t" style="padding: 5px;"> <p style="text-align:justify;margin-bottom: 15px;font-size: 14px;color: rgb(85, 87, 87);line-height: 1.75em;letter-spacing: 2px;"><span style="font-size: 16px;font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;">喜欢就<span style="color: rgb(192, 0, 0);">关注</span>我们吧!</span></p> </section> </section> <section style="background-color: rgb(255, 255, 255);letter-spacing: 0.544px;text-align: center;line-height: 1.75em;"> <section data-role="paragraph" style="letter-spacing: 0.544px;text-align: justify;"> <section data-mpa-template="t" mpa-from-tpl="t" style="letter-spacing: 1px;"> <section data-tools-id="95905" mpa-from-tpl="t"> <section data-role="paragraph"> <section data-role="paragraph" data-color="#ef7060" style="font-size: 16px;font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;"> <section data-role="paragraph"> <p style="margin-bottom: 15px;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;caret-color: red;letter-spacing: 1.5px;">在计算机技术日新月异的今天, Docker在国内发展的如火如荼,特别是在一线互联网公司,Docker的使用是十分普遍的,在理解docker之前,我们先熟悉两个概念,容器和虚拟机。</span><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;letter-spacing: 1.5px;"></span></p> </section> </section> <section data-role="paragraph" data-color="#ef7060" style="font-size: 16px;" data-id="86516" data-tools="135编辑器"> <section data-role="paragraph"> <p><br></p> </section> <section data-tools="135编辑器" data-id="86516" data-color="#ef7060"> <section style="border-bottom: 1px solid rgb(221, 221, 221);margin-right: auto;margin-bottom: 10px;margin-left: auto;" hm_fix="238:477"> <p data-brushtype="text" style="padding-right: 5px;padding-bottom: 6px;padding-left: 5px;border-bottom: 2px solid rgb(49, 133, 155);display: inline-block;margin-bottom: -1px;line-height: 1.1;font-size: 18px;"><span style="color: rgb(49, 133, 155);font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;"><strong>一、容器与虚拟机</strong></span></p> </section> </section> </section> <p><br></p> <p style="text-align:justify;box-sizing: inherit;margin-bottom: 20px;font-size: 16px;line-height: 2em;letter-spacing: 1.5px;font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;">传统的虚拟机有VMware, <span style="box-sizing: inherit;background-color: rgb(249, 249, 249);color: rgba(0, 0, 0, 0.87);">VirtualBox</span> ,它们需要模拟整台机器包括硬件,每台虚拟机都需要有自己的操作系统,虚拟机一旦开启,预分配给它们的资源将全部被占用。每一台虚拟机包括应用,必要的二进制和库,以及一个完整的用户操作系统。</span></p> <p style="text-align:justify;box-sizing: inherit;margin-bottom: 20px;font-size: 16px;line-height: 2em;letter-spacing: 1.5px;font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;">而容器技术是和我们的宿主机共享硬件资源及操作系统,可以实现资源的动态分配。容器包含应用和其所有的依赖包,但是与其他容器共享内核。容器在宿主机操作系统中,在用户控件以分离的进程运行。</span></p> <p style="text-align:justify;box-sizing: inherit;margin-bottom: 20px;font-size: 16px;line-height: 2em;letter-spacing: 1.5px;font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;">容器技术是实现操作系统虚拟化的一种途径,可以让您在资源受到隔离的进程中运行应用程序及其依赖关系。通过使用容器,我们可以轻松打包应用程序的代码、配置和依赖关系,将其编程容易使用的构建块,从而实现环境一致性、运营效率、开发人员生产力和版本控制等诸多目标。容器帮助保证应用程序快速、可靠、一致性部署,其间不受部署环境的影响。容器还赋予我们对资源更多的精细化控制能力,让我们的基础设施效率更高、通过下面这张图我们可以很直观的反映出二者的区别。</span></p> <p style="text-align:justify;box-sizing: inherit;margin-bottom: 20px;font-size: 16px;line-height: 2em;letter-spacing: 1.5px;font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;"><img data-ratio="0.5475409836065573" src="/upload/212ac74d10b98115ffe574f7f90da3d.png" data-type="png" data-w="610" height="334" style="box-sizing: border-box;width: 610px;border-width: 0px;border-style: initial;border-color: initial;margin-right: auto;margin-left: auto;vertical-align: middle;cursor: zoom-in;" width="610"></p> <p style="text-align:justify;box-sizing: inherit;margin-bottom: 20px;font-size: 16px;line-height: 2em;letter-spacing: 1.5px;font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;">Docker属于Linux容器的一种封装,提供简单易用的容器使用接口。它是目前最流行的Linux容器解决方案。</span></p> <p style="text-align:justify;box-sizing: inherit;margin-bottom: 20px;font-size: 16px;line-height: 2em;letter-spacing: 1.5px;font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;">Linux容器不是模拟一个完整的操作系统,而是对进程进行隔离,相当于在正常进程的外面套了一个保护层。对于容器里面的进程来说,它接触到的各种资源都是虚拟的,从而实现与底层系统的隔离。</span></p> <p style="text-align:justify;box-sizing: inherit;margin-bottom: 20px;font-size: 16px;line-height: 2em;letter-spacing: 1.5px;font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;">Docker将应用程序与该程序的依赖,打包在一个文件里。运行这个文件,就会生成一个虚拟容器,程序在这个虚拟容器里运行,就好像在真实的物理机上运行一样,有了Docker,就不用担心环境问题。</span></p> <p style="text-align:justify;box-sizing: inherit;margin-bottom: 20px;font-size: 16px;line-height: 2em;letter-spacing: 1.5px;font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;">总体来说,Docker的接口相当简单,用户可以方便的创建和使用容器,把自己的应用放入容器,容器还可以进行版本管理,复制,分享,修改,就像管理代码一样。</span></p> <section data-role="paragraph" data-color="#ef7060" style="font-size: 16px;" data-id="86516" data-tools="135编辑器"> <section data-role="paragraph"> <p><br></p> </section> <section data-tools="135编辑器" data-id="86516" data-color="#ef7060"> <section style="border-bottom: 1px solid rgb(221, 221, 221);margin-right: auto;margin-bottom: 10px;margin-left: auto;" hm_fix="238:477"> <p data-brushtype="text" style="padding-right: 5px;padding-bottom: 6px;padding-left: 5px;border-bottom: 2px solid rgb(49, 133, 155);display: inline-block;margin-bottom: -1px;line-height: 1.1;font-size: 18px;"><span style="color: rgb(49, 133, 155);font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;"><strong>二、Docker的优势</strong></span></p> </section> </section> </section> <p><br></p> <p style="text-align:justify;box-sizing: inherit;margin-bottom: 20px;font-size: 16px;line-height: 2em;letter-spacing: 1.5px;font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;">1、Docker启动快速,属于秒级别。虚拟机通常需要几分钟去启动。</span></p> <p style="text-align:justify;box-sizing: inherit;margin-bottom: 20px;font-size: 16px;line-height: 2em;letter-spacing: 1.5px;font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;">2、Docker需要的资源更少,Docker在操作系统级别进行虚拟化,Docker容器和内核交互,几乎没有性能损耗,性能优于通过 </span><code style="box-sizing: inherit;font-size: 13px;margin-right: 3px;margin-left: 3px;padding: 3px 4px;border-width: initial;border-style: none;border-color: initial;border-radius: 4px;background: rgb(246, 246, 246);font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;">Hypervisor</span></code><span style="box-sizing: inherit;font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;"> 层与内核层的虚拟化</span></p> <p style="text-align:justify;box-sizing: inherit;margin-bottom: 20px;font-size: 16px;line-height: 2em;letter-spacing: 1.5px;font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;"><span style="font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Apple Color Emoji", "Emoji Symbols Font", "Segoe UI Symbol", Arial, sans-serif;">3、Docker更轻量,Docker的架构可以共用一个内核与共享应用程序库,所占内存极小。同样的硬件环境,Docker运行的镜像数远低于虚拟机数量,对系统的利用率非常高<