提交 5cce26fd 编写于 作者: whatyn's avatar whatyn

fix

上级 a5ad7f9e
......@@ -10,7 +10,7 @@
首先我给大家看一张图,如果大家对这张图有些地方不太理解的话,我希望你们看完我这篇文章会恍然大悟。
![Spring Cloud 总体架构](https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/spring-cloud总体架构.jpg)
![Spring Cloud 总体架构](https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/spring-cloud总体架构.jpg)
## 什么是Spring Cloud
......@@ -40,11 +40,11 @@
那怎么办呢?我们当然不会那么傻乎乎的,第一时间就是去找 **中介** 呀,它为我们提供了统一房源的地方,我们消费者只需要跑到它那里去找就行了。而对于房东来说,他们也只需要把房源在中介那里发布就行了。
![](https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/4d161e2950414113834f2f0a8fc2c16c-new-imaged17347a0-e653-4830-9542-3d7ae4305b2b.png)
![](https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/4d161e2950414113834f2f0a8fc2c16c-new-imaged17347a0-e653-4830-9542-3d7ae4305b2b.png)
那么现在,我们的模式就是这样的了。
![](https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/24382ce6bbd44932ac38b1accade12d1-new-image2ff8affc-6f1d-49de-a8c3-801e7bad2b11.png)
![](https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/24382ce6bbd44932ac38b1accade12d1-new-image2ff8affc-6f1d-49de-a8c3-801e7bad2b11.png)
但是,这个时候还会出现一些问题。
......@@ -54,7 +54,7 @@
针对上面的问题我们来重新构建一下上面的模式图
![租房-中介模式图](https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/租房-中介模式图.jpg)
![租房-中介模式图](https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/租房-中介模式图.jpg)
好了,举完这个:chestnut:我们就可以来看关于 `Eureka` 的一些基础概念了,你会发现这东西理解起来怎么这么简单。:punch::punch::punch:
......@@ -98,7 +98,7 @@
下面就是 `Netflix` 官方给出的 `Eureka` 架构图,你会发现和我们前面画的中介图别无二致。
![Eureka架构图](https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/5d723c49eca1468ab7b89af06743023c-new-imageb8aa3d41-fad4-4b38-add9-c304930ab285.png)
![Eureka架构图](https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/5d723c49eca1468ab7b89af06743023c-new-imageb8aa3d41-fad4-4b38-add9-c304930ab285.png)
当然,可以充当服务发现的组件有很多:`Zookeeper``Consul``Eureka` 等。
......@@ -134,13 +134,13 @@ public boolean judge(@RequestBody Request request) {
我们再举个:chestnut:,比如我们设计了一个秒杀系统,但是为了整个系统的 **高可用** ,我们需要将这个系统做一个集群,而这个时候我们消费者就可以拥有多个秒杀系统的调用途径了,如下图。
<img src="https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/秒杀系统-ribbon.jpg" style="zoom:50%;" />
<img src="https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/秒杀系统-ribbon.jpg" style="zoom:50%;" />
如果这个时候我们没有进行一些 **均衡操作** ,如果我们对 `秒杀系统1` 进行大量的调用,而另外两个基本不请求,就会导致 `秒杀系统1` 崩溃,而另外两个就变成了傀儡,那么我们为什么还要做集群,我们高可用体现的意义又在哪呢?
所以 `Ribbon` 出现了,注意我们上面加粗的几个字——**运行在消费者端**。指的是,`Ribbon` 是运行在消费者端的负载均衡器,如下图。
<img src="https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/秒杀系统-ribbon2.jpg" style="zoom:50%;" />
<img src="https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/秒杀系统-ribbon2.jpg" style="zoom:50%;" />
其工作原理就是 `Consumer` 端获取到了所有的服务列表之后,在其**内部**使用**负载均衡算法**,进行对多个系统的调用。
......@@ -150,11 +150,11 @@ public boolean judge(@RequestBody Request request) {
何为集中式呢?简单理解就是 **将所有请求都集中起来,然后再进行负载均衡**。如下图。
<img src="https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/nginx-vs-ribbon1.jpg" style="zoom:50%;" />
<img src="https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/nginx-vs-ribbon1.jpg" style="zoom:50%;" />
我们可以看到 `Nginx` 是接收了所有的请求进行负载均衡的,而对于 `Ribbon` 来说它是在消费者端进行的负载均衡。如下图。
<img src="https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/nginx-vs-ribbon2.jpg" style="zoom:50%;" />
<img src="https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/nginx-vs-ribbon2.jpg" style="zoom:50%;" />
> 请注意 `Request` 的位置,在 `Nginx` 中请求是先进入负载均衡器,而在 `Ribbon` 中是先在客户端进行负载均衡才进行请求的。
......@@ -239,19 +239,19 @@ public class TestController {
那么什么是 熔断和降级 呢?再举个:chestnut:,此时我们整个微服务系统是这样的。服务A调用了服务B,服务B再调用了服务C,但是因为某些原因,服务C顶不住了,这个时候大量请求会在服务C阻塞。
<img src="https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/Hystrix1.jpg" style="zoom:50%;" />
<img src="https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/Hystrix1.jpg" style="zoom:50%;" />
服务C阻塞了还好,毕竟只是一个系统崩溃了。但是请注意这个时候因为服务C不能返回响应,那么服务B调用服务C的的请求就会阻塞,同理服务B阻塞了,那么服务A也会阻塞崩溃。
> 请注意,为什么阻塞会崩溃。因为这些请求会消耗占用系统的线程、IO 等资源,消耗完你这个系统服务器不就崩了么。
<img src="https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/Hystrix2.jpg" style="zoom:50%;" />
<img src="https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/Hystrix2.jpg" style="zoom:50%;" />
这就叫 **服务雪崩**。妈耶,上面两个 **熔断****降级** 你都没给我解释清楚,你现在又给我扯什么 **服务雪崩** ?:tired_face::tired_face::tired_face:
别急,听我慢慢道来。
![](https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/513d7e7f6d574fd799195d05556f4aa7-new-image9265b6bd-41ca-4e62-86f3-4341e5bdbe6c.png)
![](https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/513d7e7f6d574fd799195d05556f4aa7-new-image9265b6bd-41ca-4e62-86f3-4341e5bdbe6c.png)
不听我也得讲下去!
......@@ -304,7 +304,7 @@ public News getHystrixNews(@PathVariable("id") int id) {
大家对网关应该很熟吧,简单来讲网关是系统唯一对外的入口,介于客户端与服务器端之间,用于对请求进行**鉴权****限流****路由****监控**等功能。
<img src="https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/zuul-sj22o93nfdsjkdsf.jpg" style="zoom:50%;" />
<img src="https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/zuul-sj22o93nfdsjkdsf.jpg" style="zoom:50%;" />
没错,网关有的功能,`Zuul` 基本都有。而 `Zuul` 中最关键的就是 **路由和过滤器** 了,在官方文档中 `Zuul` 的标题就是
......@@ -320,7 +320,7 @@ public News getHystrixNews(@PathVariable("id") int id) {
比如这个时候我们已经向 `Eureka Server` 注册了两个 `Consumer` 、三个 `Provicer` ,这个时候我们再加个 `Zuul` 网关应该变成这样子了。
<img src="https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/zuul-sj22o93nfdsjkdsf2312.jpg" style="zoom:50%;" />
<img src="https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/zuul-sj22o93nfdsjkdsf2312.jpg" style="zoom:50%;" />
emmm,信息量有点大,我来解释一下。关于前面的知识我就不解释了:neutral_face:。
......@@ -412,7 +412,7 @@ zuul:
在给你们看代码之前我先给你们解释一下关于过滤器的一些注意点。
<img src="https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/zuul-sj22o93nfdsjkdsf2312244.jpg" style="zoom:50%;" />
<img src="https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/zuul-sj22o93nfdsjkdsf2312244.jpg" style="zoom:50%;" />
过滤器类型:`Pre`、`Routing`、`Post`。前置`Pre`就是在请求之前进行过滤,`Routing`路由过滤器就是我们上面所讲的路由策略,而`Post`后置过滤器就是在 `Response` 之前进行过滤的过滤器。你可以观察上图结合着理解,并且下面我会给出相应的注释。
......@@ -497,7 +497,7 @@ public class AccessLogFilter extends ZuulFilter {
当然不仅仅是令牌桶限流方式,`Zuul` 只要是限流的活它都能干,这里我只是简单举个:chestnut:。
<img src="https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/zuui-令牌桶限流.jpg" alt="令牌桶限流" style="zoom:50%;" />
<img src="https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/zuui-令牌桶限流.jpg" alt="令牌桶限流" style="zoom:50%;" />
我先来解释一下什么是 **令牌桶限流** 吧。
......@@ -583,7 +583,7 @@ public class RouteFilter extends ZuulFilter {
你想一下,我们的应用是不是只有启动的时候才会进行配置文件的加载,那么我们的 `Spring Cloud Config` 就暴露出一个接口给启动应用来获取它所想要的配置文件,应用获取到配置文件然后再进行它的初始化工作。就如下图。
<img src="https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/config-ksksks.jpg" style="zoom:50%;" />
<img src="https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/config-ksksks.jpg" style="zoom:50%;" />
当然这里你肯定还会有一个疑问,如果我在应用运行时去更改远程配置仓库(Git)中的对应配置文件,那么依赖于这个配置文件的已启动的应用会不会进行其相应配置的更改呢?
......@@ -597,7 +597,7 @@ public class RouteFilter extends ZuulFilter {
慢着,听我说完,`Webhooks` 虽然能解决,但是你了解一下会发现它根本不适合用于生产环境,所以基本不会使用它的。
![](https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/1ada747175704ecba3507074847002d0-new-imagee5249fee-c5ee-4472-9983-f1bd5801387c.png)
![](https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/1ada747175704ecba3507074847002d0-new-imagee5249fee-c5ee-4472-9983-f1bd5801387c.png)
而一般我们会使用 `Bus` 消息总线 + `Spring Cloud Config` 进行配置的动态刷新。
......@@ -609,7 +609,7 @@ public class RouteFilter extends ZuulFilter {
而拥有了 `Spring Cloud Bus` 之后,我们只需要创建一个简单的请求,并且加上 `@ResfreshScope` 注解就能进行配置的动态修改了,下面我画了张图供你理解。
![]( https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/spring-cloud/springcloud-bus-s213dsfsd.jpg )
![]( https://md.xushufa.cn/gitimg/document/imgs/java/spring-cloud/springcloud-bus-s213dsfsd.jpg )
## 总结
......
......@@ -2,8 +2,7 @@
## 1、java常用方法
```
```java
@Data
@AllArgsConstructor
@NoArgsConstructor
......@@ -12,7 +11,9 @@ public class ComboboxVO {}
MessageResult result = JSON.parseObject(text, new TypeReference<MessageResult>() {});
List<DiffRegionLogisticsDetailVO> cateList = JSON.parseObject(text, new TypeReference<List<DiffRegionLogisticsDetailVO>>() {});
String detail = JSON.toJSONStringWithDateFormat(billDO, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat);
# 格式化全局时间
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
......@@ -25,6 +26,15 @@ private Date createTime;
Assert.isTrue(!StringUtils.isEmpty(param.getPhone()), "联系方式不能为空");
@MapKey("operatorId")
List<Map<Integer, String>> queryOperatorList();
<select id="queryOperatorList" resultType="java.util.Map">
select operator_id operatorId,operator_name operatorName from ins_region_log
GROUP BY operator_id
</select>
```
### 1.1、lambda表达式
......@@ -436,6 +446,7 @@ Project - Show Options Menu - Show Members
idea常用插件 File -- Settings -- Plugins
lombok
Free Mybatis plugin MybatisX
GenerateAllSetter Alt+Enter
Spring Assistant
Translation
......@@ -494,23 +505,22 @@ syso+Alt+/ 输出
> Java Development Kit (JDK) 是Sun公司(已被Oracle收购)针对Java开发员的软件开发工具包。自从Java推出以来,JDK已经成为使用最广泛的Java SDK(Software development kit)。
- [ ] jdk6--jdk10都是来自[官网]( http://www.oracle.com/technetwork/java/archive-139210.html )
这些jdk软件有三种格式:tar.gz、zip、bin
- [ ] jdk来自[官网]( http://www.oracle.com/technetwork/java/archive-139210.html ) ,这些软件有三种格式:tar.gz、zip、bin
- 1、zip是windoxs软件,解压后会有exe格式的jdk软件,直接安装即可。
- 2、tar.gz是linux软件,需要用tar -zxvf xx.tar.gz解压。
- 2、tar.gz是linux软件,需要用 `tar -zxvf xx.tar.gz` 解压。
- 3、bin也是linux软件,需解压:
- 添加执行权限
chmod u+x jdk-6u45-linux-x64.bin
`chmod u+x jdk-6u45-linux-x64.bin`
- 解压
./jdk-6u45-linux-x64.bin
`./jdk-6u45-linux-x64.bin`
- [ ] 软件名称里含有x64则是64位软件,32位为则没有。如下:
- jdk-8u162-windows-x64.zip jdk-8u162-linux-x64.tar.gz 是64位软件
- jdk-8u72-windows-i586.zip jdk-8u72-linux-i586.tar.gz 是32位软件
- `jdk-8u162-windows-x64.zip` `jdk-8u162-linux-x64.tar.gz` 是64位软件
- `jdk-8u72-windows-i586.zip` `jdk-8u72-linux-i586.tar.gz` 是32位软件
| 云盘链接 | 密码 |
| -------- | ----- |
| 云盘链接 | 密码 |
| -------------------------------- | --- |
| [jdk6]( https://pan.baidu.com/s/1z3p1DecyBVugP7cECIupyg ) | 829h |
| [jdk7]( https://pan.baidu.com/s/17ik9x-g3RkYEu6vah9CZVw ) | muvr |
| [jdk8]( https://pan.baidu.com/s/1MT8zldLnH9PuZsVR77DEAw ) | mv5i |
......@@ -647,7 +657,7 @@ maven常用打包命令
| 无为徐生 | 微信公众号 | &ensp; | 今日头条号 |
| --------- | ------------------------------------------------------------- | - | ---------- |
| 二维码 | ![w]( https://xyqin.coding.net/p/my/d/imgs/git/raw/master/other/wuweixusheng_weixin.png ) | <br/> | ![t]( https://xyqin.coding.net/p/my/d/imgs/git/raw/master/other/wuweixusheng_toutiao.png ) |
| 二维码 | ![w]( https://md.xushufa.cn/gitimg/imgs/other/wuweixusheng_weixin.png ) | <br/> | ![t]( https://md.xushufa.cn/gitimg/imgs/other/wuweixusheng_toutiao.png ) |
***
......
......@@ -2,7 +2,7 @@
## 1、简介
```
```java
Java是一门面向对象编程语言1990年代初由詹姆斯·高斯林等人开发出Java语言的雏形最初被命名为Oak后随着互联网的发展经过对Oak的改造1995年5月Java正式发布
Java具有简单性面向对象分布式健壮性安全性平台独立与可移植性多线程动态性等特点Java可以编写桌面应用程序Web应用程序分布式系统和嵌入式系统应用程序等
......@@ -18,20 +18,20 @@ Java具有简单性、面向对象、分布式、健壮性、安全性、平台
- [ ] jdk来自[官网]( http://www.oracle.com/technetwork/java/archive-139210.html ) ,这些软件有三种格式:tar.gz、zip、bin
- 1、zip是windoxs软件,解压后会有exe格式的jdk软件,直接安装即可。
- 2、tar.gz是linux软件,需要用tar -zxvf xx.tar.gz解压。
- 2、tar.gz是linux软件,需要用 `tar -zxvf xx.tar.gz` 解压。
- 3、bin也是linux软件,需解压:
- 添加执行权限
chmod u+x jdk-6u45-linux-x64.bin
`chmod u+x jdk-6u45-linux-x64.bin`
- 解压
./jdk-6u45-linux-x64.bin
`./jdk-6u45-linux-x64.bin`
- [ ] 软件名称里含有x64则是64位软件,32位为则没有。如下:
- jdk-8u162-windows-x64.zip jdk-8u162-linux-x64.tar.gz 是64位软件
- jdk-8u72-windows-i586.zip jdk-8u72-linux-i586.tar.gz 是32位软件
- `jdk-8u162-windows-x64.zip` `jdk-8u162-linux-x64.tar.gz` 是64位软件
- `jdk-8u72-windows-i586.zip` `jdk-8u72-linux-i586.tar.gz` 是32位软件
| 云盘链接 | 密码 |
| -------- | ----- |
| 云盘链接 | 密码 |
| -------------------------------- | --- |
| [jdk6]( https://pan.baidu.com/s/1z3p1DecyBVugP7cECIupyg ) | 829h |
| [jdk7]( https://pan.baidu.com/s/17ik9x-g3RkYEu6vah9CZVw ) | muvr |
| [jdk8]( https://pan.baidu.com/s/1MT8zldLnH9PuZsVR77DEAw ) | mv5i |
......
此差异已折叠。
......@@ -21,7 +21,7 @@
布隆过滤器(Bloom Filter)是一个叫做 Bloom 的老哥于 1970 年提出的。我们可以把它看作由二进制向量(或者说位数组)和一系列随机映射函数(哈希函数)两部分组成的数据结构。相比于我们平时常用的的 List、Map 、Set 等数据结构,它占用空间更少并且效率更高,但是缺点是其返回的结果是概率性的,而不是非常准确的。理论情况下添加到集合中的元素越多,误报的可能性就越大。并且,存放在布隆过滤器的数据不容易删除。
![布隆过滤器示意图]( https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/Bloom-bit.png )
![布隆过滤器示意图]( https://md.xushufa.cn/gitimg/document/imgs/java/Bloom-bit.png )
位数组中的每个元素都只占用 1 bit ,并且每个元素只能是 0 或者 1。这样申请一个 100w 个元素的位数组只占用 1000000Bit / 8 = 125000 Byte = 125000/1024 kb ≈ 122kb 的空间。
......@@ -41,7 +41,7 @@
举个简单的例子:
![布隆过滤器hash计算]( https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/java/Bloom-hash.png )
![布隆过滤器hash计算]( https://md.xushufa.cn/gitimg/document/imgs/java/Bloom-hash.png )
如图所示,当字符串存储要加入到布隆过滤器中时,该字符串首先由多个哈希函数生成不同的哈希值,然后将对应的位数组的下标设置为 1(当位数组初始化时,所有位置均为 0)。当第二次存储相同字符串时,因为先前的对应位置已设置为 1,所以很容易知道此值已经存在(去重非常方便)。
......
......@@ -529,8 +529,7 @@ http://localhost:8080/druid/sql.html
### 2.1、java常用方法
```
```java
@Data
@AllArgsConstructor
@NoArgsConstructor
......@@ -539,7 +538,9 @@ public class ComboboxVO {}
MessageResult result = JSON.parseObject(text, new TypeReference<MessageResult>() {});
List<DiffRegionLogisticsDetailVO> cateList = JSON.parseObject(text, new TypeReference<List<DiffRegionLogisticsDetailVO>>() {});
String detail = JSON.toJSONStringWithDateFormat(billDO, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat);
# 格式化全局时间
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
......@@ -552,6 +553,15 @@ private Date createTime;
Assert.isTrue(!StringUtils.isEmpty(param.getPhone()), "联系方式不能为空");
@MapKey("operatorId")
List<Map<Integer, String>> queryOperatorList();
<select id="queryOperatorList" resultType="java.util.Map">
select operator_id operatorId,operator_name operatorName from ins_region_log
GROUP BY operator_id
</select>
```
#### 2.1.1、lambda表达式
......@@ -963,6 +973,7 @@ Project - Show Options Menu - Show Members
idea常用插件 File -- Settings -- Plugins
lombok
Free Mybatis plugin MybatisX
GenerateAllSetter Alt+Enter
Spring Assistant
Translation
......@@ -1021,23 +1032,22 @@ syso+Alt+/ 输出
> Java Development Kit (JDK) 是Sun公司(已被Oracle收购)针对Java开发员的软件开发工具包。自从Java推出以来,JDK已经成为使用最广泛的Java SDK(Software development kit)。
- [ ] jdk6--jdk10都是来自[官网]( http://www.oracle.com/technetwork/java/archive-139210.html )
这些jdk软件有三种格式:tar.gz、zip、bin
- [ ] jdk来自[官网]( http://www.oracle.com/technetwork/java/archive-139210.html ) ,这些软件有三种格式:tar.gz、zip、bin
- 1、zip是windoxs软件,解压后会有exe格式的jdk软件,直接安装即可。
- 2、tar.gz是linux软件,需要用tar -zxvf xx.tar.gz解压。
- 2、tar.gz是linux软件,需要用 `tar -zxvf xx.tar.gz` 解压。
- 3、bin也是linux软件,需解压:
- 添加执行权限
chmod u+x jdk-6u45-linux-x64.bin
`chmod u+x jdk-6u45-linux-x64.bin`
- 解压
./jdk-6u45-linux-x64.bin
`./jdk-6u45-linux-x64.bin`
- [ ] 软件名称里含有x64则是64位软件,32位为则没有。如下:
- jdk-8u162-windows-x64.zip jdk-8u162-linux-x64.tar.gz 是64位软件
- jdk-8u72-windows-i586.zip jdk-8u72-linux-i586.tar.gz 是32位软件
- `jdk-8u162-windows-x64.zip` `jdk-8u162-linux-x64.tar.gz` 是64位软件
- `jdk-8u72-windows-i586.zip` `jdk-8u72-linux-i586.tar.gz` 是32位软件
| 云盘链接 | 密码 |
| -------- | ----- |
| 云盘链接 | 密码 |
| -------------------------------- | --- |
| [jdk6]( https://pan.baidu.com/s/1z3p1DecyBVugP7cECIupyg ) | 829h |
| [jdk7]( https://pan.baidu.com/s/17ik9x-g3RkYEu6vah9CZVw ) | muvr |
| [jdk8]( https://pan.baidu.com/s/1MT8zldLnH9PuZsVR77DEAw ) | mv5i |
......@@ -1174,7 +1184,7 @@ maven常用打包命令
| 无为徐生 | 微信公众号 | &ensp; | 今日头条号 |
| --------- | ------------------------------------------------------------- | - | ---------- |
| 二维码 | ![w]( https://xyqin.coding.net/p/my/d/imgs/git/raw/master/other/wuweixusheng_weixin.png ) | <br/> | ![t]( https://xyqin.coding.net/p/my/d/imgs/git/raw/master/other/wuweixusheng_toutiao.png ) |
| 二维码 | ![w]( https://md.xushufa.cn/gitimg/imgs/other/wuweixusheng_weixin.png ) | <br/> | ![t]( https://md.xushufa.cn/gitimg/imgs/other/wuweixusheng_toutiao.png ) |
***
......
......@@ -418,12 +418,12 @@ usr/lib/mysql 是指:mysql的安装路径
导出数据库 /opt/tech/mysql/bin/mysqldump -uroot -p1234 webpro > /opt/tech/20170814.sql
导入数据 mysql -uroot -pSudy.web123 UCPPLUS < /opt/sql/ucpplus_v4_0_5.sql
导入数据 mysql -uroot -psd.web123 UCPPLUS < /opt/sql/ucpplus_v4_0_5.sql
mysql导入时出现"ERROR at line : Unknown command '\''."的解决办法
mysql -uroot -p12344 --default-character-set=utf8 IMP_V12_1 < E:\ids-1.1.2.sql
导出查询语句 /opt/sudytech/mysql/bin/mysql -uroot -p12344 -e "use IDSPLUS;select id,loginName from T_USER where id=1\G;" >> /opt/test.txt
导出查询语句 /opt/sdtech/mysql/bin/mysql -uroot -p12344 -e "use IDSPLUS;select id,loginName from T_USER where id=1\G;" >> /opt/test.txt
导出表 /opt/tech/mysql/bin/mysqldump -uroot -p1234 webpro t_user > /opt/tech/t_user.sql
......@@ -452,9 +452,9 @@ mysql -u root -p12344
navicat连接mysql失败,授权:
GRANT ALL PRIVILEGES ON `db1`.* TO 'user1'@'192.171.1.18' identified by 'pwd1' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON `IDSPLUS`.* TO 'sudy'@'192.171.1.18' identified by 'shhg12344' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON `IDSPLUS`.* TO 'sd'@'192.171.1.18' identified by 'shhg12344' WITH GRANT OPTION;
grant all privileges on *.* to root@'%' identified by 'Sudy.web123' with grant option;
grant all privileges on *.* to root@'%' identified by 'sd.web123' with grant option;
-- flush privileges;
......@@ -486,19 +486,19 @@ SELECT @@GLOBAL.sql_mode;
lower_case_table_names = 2
启动mysql
/opt/sudytech/mysql/support-files/mysql.server start
/opt/sdtech/mysql/support-files/mysql.server start
/opt/sudytech/mysql/bin/mysqld_safe --user=mysql --basedir=/opt/sudytech/mysql --datadir=/opt/sudytech/mysql/data &
/opt/sdtech/mysql/bin/mysqld_safe --user=mysql --basedir=/opt/sdtech/mysql --datadir=/opt/sdtech/mysql/data &
cd /opt/sudytech/mysql/
cd /opt/sdtech/mysql/
./bin/mysqld_safe &
chmod -R 775 mysql
cd /data/sudytech/mysql/&&./bin/mysqld_safe &
cd /opt/sudytech/mysql/ && bin/mysqld_safe --user=root &
cd /data/sdtech/mysql/&&./bin/mysqld_safe &
cd /opt/sdtech/mysql/ && bin/mysqld_safe --user=root &
```
......@@ -506,10 +506,19 @@ lower_case_table_names = 2
```
sql将毫秒数字转换为日期
SELECT FROM_UNIXTIME(operation_time/1000,"%Y-%m-%d %H:%i:%s") operationDate FROM ins_purchase
```
```sql
--时间计算
SELECT id,car_number,tel,person_liable,result,create_time,
date_format(create_time, '%H:%i:%s') t1,
timediff(date_format(create_time, '%H:%i:%s'),'03:00:00') t2,
(HOUR(timediff(date_format(create_time, '%H:%i:%s'),'03:00:00')) + ROUND(MINUTE(timediff(date_format(create_time, '%H:%i:%s'),'03:00:00'))/60) )
t3 FROM `ins_car_use_log` where person_liable like '%林%'
order by create_time desc limit 100;
```
......@@ -608,8 +617,7 @@ select id,group_concat(name order by name desc) from aa group by id;
### 3.3、left join左右连接
```
```sql
sqlleft joinright joininner join的区别
https://www.cnblogs.com/pcjim/articles/799302.html
......@@ -925,6 +933,6 @@ mysql> exit;
- [数据库隔离级别]( https://blog.xushufa.cn )
- [mysql开启log-bin日志]( https://reco-blog.xushufa.cn )
- [mysql开启log-bin日志]( https://web.xushufa.cn )
......@@ -54,25 +54,25 @@ pagefile.sys是虚拟内存文件,目地是使用一部分硬盘空间来充
1、选择工具-文件夹选项 &ensp; [图解]( https://gitcode.net/xu180/document/-/raw/master/imgs/pagefile/111.jpg )
![111]( https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/pagefile/111.jpg )
![111]( https://md.xushufa.cn/gitimg/document/imgs/pagefile/111.jpg )
---
2、查看-取消选中“隐藏受保护的操作系统文件(推荐)”,警告弹窗选择“是” &ensp; [图解]( https://gitcode.net/xu180/document/-/raw/master/imgs/pagefile/222.jpg )
![222]( https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/pagefile/222.jpg )
![222]( https://md.xushufa.cn/gitimg/document/imgs/pagefile/222.jpg )
---
3、确定 &ensp; [图解]( https://gitcode.net/xu180/document/-/raw/master/imgs/pagefile/333.jpg )
![333]( https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/pagefile/333.jpg )
![333]( https://md.xushufa.cn/gitimg/document/imgs/pagefile/333.jpg )
---
4、查看pagefile.sys文件大小 &ensp; [图解]( https://gitcode.net/xu180/document/-/raw/master/imgs/pagefile/444.jpg )
![444]( https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/pagefile/444.jpg )
![444]( https://md.xushufa.cn/gitimg/document/imgs/pagefile/444.jpg )
---
......
......@@ -36,11 +36,11 @@ TTL: 600
浏览器地址栏可能会提示“不安全” , 勾选 Enforce HTTPS ,稍后再访问。
```
![1]( https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/other/custom_domain1.png )
![1]( https://md.xushufa.cn/gitimg/document/imgs/other/custom_domain1.png )
---
![2]( https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/other/custom_domain2.png )
![2]( https://md.xushufa.cn/gitimg/document/imgs/other/custom_domain2.png )
---
......@@ -83,7 +83,7 @@ TTL: 600
注:记录值就是 上一步Pages Domain的 Verification status 的 _gitlab-pages-verification-code.mkdocs-blog.xushufa.cn TXT 后面的值
```
![3]( https://xyqin.coding.net/p/my/d/document/git/raw/master/imgs/other/custom_domain3.png )
![3]( https://md.xushufa.cn/gitimg/document/imgs/other/custom_domain3.png )
- 5、在gitlab pages -- Pages Domain -- Verification status <br/>
点击 Verified 如果有对号 说明域名绑定了。 <br/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册