Skip to content

Commit

Permalink
更新高级篇
Browse files Browse the repository at this point in the history
  • Loading branch information
NiceSeason committed Oct 3, 2020
1 parent fc52fec commit d766d0c
Show file tree
Hide file tree
Showing 24 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion docs/谷粒商城—分布式基础.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ spring:
datasource:
username: root
password: root
url: jdbc:mysql://47.110.152.217:3306/gulimall_pms
url: jdbc:mysql://#:3306/gulimall_pms
driver-class-name: com.mysql.cj.jdbc.Driver
```

Expand Down
32 changes: 16 additions & 16 deletions docs/谷粒商城—分布式高级.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ docker update kibana --restart=always

(5)测试

查看elasticsearch版本信息: http://47.110.152.217:9200/
查看elasticsearch版本信息: http://#:9200/

```json
{
Expand All @@ -84,15 +84,15 @@ docker update kibana --restart=always



显示elasticsearch 节点信息http://47.110.152.217:9200/_cat/nodes
显示elasticsearch 节点信息http://#:9200/_cat/nodes ,

```json
127.0.0.1 76 95 1 0.26 1.40 1.22 dilm * 0adeb7852e00
```



访问Kibana: http://47.110.152.217:5601/app/kibana
访问Kibana: http://#:5601/app/kibana

![image-20200501192629304](images/image-20200501192629304.png)

Expand All @@ -104,7 +104,7 @@ docker update kibana --restart=always

(1)GET/_cat/nodes:查看所有节点_

如:http://47.110.152.217:9200/_cat/nodes :
如:http://#:9200/_cat/nodes :

```
127.0.0.1 61 91 11 0.08 0.49 0.87 dilm * 0adeb7852e00
Expand All @@ -114,7 +114,7 @@ docker update kibana --restart=always

(2)GET/_cat/health:查看es健康状况_

如: http://47.110.152.217:9200/_cat/health
如: http://#:9200/_cat/health

```
1588332616 11:30:16 elasticsearch green 1 1 3 3 0 0 0 0 - 100.0%
Expand All @@ -124,15 +124,15 @@ docker update kibana --restart=always

(3)GET/_cat/master:查看主节点_

如: http://47.110.152.217:9200/_cat/master
如: http://#:9200/_cat/master

```
vfpgxbusTC6-W3C2Np31EQ 127.0.0.1 127.0.0.1 0adeb7852e00
```

(4)GET/_cat/indicies:查看所有索引 ,等价于mysql数据库的show databases;

如: http://47.110.152.217:9200/_cat/indices
如: http://#:9200/_cat/indices

```json
green open .kibana_task_manager_1 KWLtjcKRRuaV9so_v15WYg 1 0 2 0 39.8kb 39.8kb
Expand Down Expand Up @@ -224,7 +224,7 @@ PUT可以新增也可以修改。PUT必须指定id;由于PUT需要指定id,

GET /customer/external/1

http://47.110.152.217:9200/customer/external/1
http://#:9200/customer/external/1

```json
{
Expand All @@ -251,13 +251,13 @@ GET /customer/external/1

(1)将name更新为1

http://47.110.152.217:9200/customer/external/1?if_seq_no=6&if_primary_term=1
http://#:9200/customer/external/1?if_seq_no=6&if_primary_term=1

<img src="images/image-20200501212224983.png" alt="image-20200501212224983" style="zoom: 61%;" />

(2)将name更新为2,更新过程中使用seq_no=6

http://47.110.152.217:9200/customer/external/1?if_seq_no=6&if_primary_term=1
http://#:9200/customer/external/1?if_seq_no=6&if_primary_term=1

<img src="images/image-20200501213047499.png" alt="image-20200501213047499" style="zoom: 60%;" />

Expand All @@ -267,15 +267,15 @@ http://47.110.152.217:9200/customer/external/1?if_seq_no=6&if_primary_term=1

(3)查询新的数据

http://47.110.152.217:9200/customer/external/1
http://#:9200/customer/external/1

![image-20200501212924094](images/image-20200501212924094.png)

能够看到_seq_no变为7。

(4)再次更新,更新成功

http://47.110.152.217:9200/customer/external/1?if_seq_no=7&if_primary_term=1
http://#:9200/customer/external/1?if_seq_no=7&if_primary_term=1

<img src="images/image-20200501213130001.png" alt="image-20200501213130001" style="zoom:75%;" />

Expand All @@ -287,7 +287,7 @@ http://47.110.152.217:9200/customer/external/1?if_seq_no=6&if_primary_term=1

(1)POST更新文档,带有_update

http://47.110.152.217:9200/customer/external/1/_update
http://#:9200/customer/external/1/_update

![image-20200501214810741](images/image-20200501214810741.png)

Expand Down Expand Up @@ -3577,7 +3577,7 @@ GET my_index/_analyze
<!--用户可以在这里配置自己的扩展停止词字典-->
<entry key="ext_stopwords"></entry>
<!--用户可以在这里配置远程扩展字典 -->
<entry key="remote_ext_dict">http://47.110.152.217/es/fenci.txt</entry>
<entry key="remote_ext_dict">http://#/es/fenci.txt</entry>
<!--用户可以在这里配置远程扩展停止词字典-->
<!-- <entry key="remote_ext_stopwords">words_location</entry> -->
</properties>
Expand Down Expand Up @@ -3614,7 +3614,7 @@ POST my_index/_update_by_query?conflicts=proceed



http://47.110.152.217/es/fenci.txt,这个是nginx上资源的访问路径
http://#/es/fenci.txt,这个是nginx上资源的访问路径

在运行下面实例之前,需要安装nginx(安装方法见安装nginx),然后创建“fenci.txt”文件,内容如下:

Expand Down Expand Up @@ -4650,7 +4650,7 @@ List<CategoryEntity> categoryEntities = this.list(new QueryWrapper<CategoryEntit
```yaml
spring:
redis:
host: 47.110.152.217
host: #
port: 6379
```
Expand Down
2 changes: 1 addition & 1 deletion gulimall-auth-server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ spring:
cloud:
nacos:
discovery:
server-addr: 47.110.152.217
server-addr: #
redis:
host: 192.168.56.102
session:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spring.application.name=gulimall-auth-server
spring.cloud.nacos.config.server-addr=47.110.152.217
spring.cloud.nacos.config.server-addr=#
spring.cloud.nacos.config.namespace=8e55c131-592c-49fb-bf71-e1ce83e8dcff
spring.cloud.nacos.config.file-extension=yaml
2 changes: 1 addition & 1 deletion gulimall-cart/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ spring:
cloud:
nacos:
discovery:
server-addr: 47.110.152.217
server-addr: #
application:
name: gulimall-cart
thymeleaf:
Expand Down
2 changes: 1 addition & 1 deletion gulimall-cart/src/main/resources/bootstrap.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spring.application.name=gulimall-cart
spring.cloud.nacos.config.server-addr=47.110.152.217
spring.cloud.nacos.config.server-addr=#
spring.cloud.nacos.config.namespace=39798594-f6ff-4395-9116-afd05ee9ac8d
spring.cloud.nacos.config.file-extension=yaml
4 changes: 2 additions & 2 deletions gulimall-coupon/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ spring:
datasource:
username: root
password: root
url: jdbc:mysql://47.110.152.217:3306/gulimall_sms
url: jdbc:mysql://#:3306/gulimall_sms
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
max-lifetime: 500000
Expand All @@ -12,7 +12,7 @@ spring:
cloud:
nacos:
discovery:
server-addr: 47.110.152.217
server-addr: #

mybatis-plus:
mapper-locations: classpath:/mapper/**/*.xml
Expand Down
2 changes: 1 addition & 1 deletion gulimall-coupon/src/main/resources/bootstrap.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spring.application.name=gulimall-coupon
spring.cloud.nacos.config.server-addr=47.110.152.217:8848
spring.cloud.nacos.config.server-addr=#:8848
spring.cloud.nacos.config.namespace=0a4f62b1-33ee-4480-aa4c-2acb7d31cc94
spring.cloud.nacos.config.file-extension=yaml

Expand Down
2 changes: 1 addition & 1 deletion gulimall-gateway/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
spring.application.name=gulimall-gateway
spring.cloud.nacos.discovery.server-addr=47.110.152.217:8848
spring.cloud.nacos.discovery.server-addr=#:8848
server.port=88
2 changes: 1 addition & 1 deletion gulimall-gateway/src/main/resources/bootstrap.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
spring.application.name=gulimall-gateway
spring.cloud.nacos.config.server-addr=47.110.152.217:8848
spring.cloud.nacos.config.server-addr=#:8848
spring.cloud.nacos.config.namespace=efff56d1-78a5-49cc-8592-710f9706f86d
4 changes: 2 additions & 2 deletions gulimall-member/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ spring:
datasource:
username: root
password: root
url: jdbc:mysql://47.110.152.217:3306/gulimall_ums
url: jdbc:mysql://#:3306/gulimall_ums
driver-class-name: com.mysql.cj.jdbc.Driver
application:
name: gulimall-member
cloud:
nacos:
discovery:
server-addr: 47.110.152.217
server-addr: #
mybatis-plus:
mapper-locations: classpath:/mapper/**/*.xml
global-config:
Expand Down
2 changes: 1 addition & 1 deletion gulimall-member/src/main/resources/bootstrap.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spring.application.name=gulimall-member
spring.cloud.nacos.config.server-addr=47.110.152.217
spring.cloud.nacos.config.server-addr=#
spring.cloud.nacos.config.namespace=a9bd3d0c-393b-4a86-be4b-dea89275ebb9
spring.cloud.nacos.config.file-extension=yaml
4 changes: 2 additions & 2 deletions gulimall-order/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ spring:
datasource:
username: root
password: root
url: jdbc:mysql://47.110.152.217:3306/gulimall_oms
url: jdbc:mysql://#:3306/gulimall_oms
driver-class-name: com.mysql.cj.jdbc.Driver
application:
name: gulimall-order
cloud:
nacos:
discovery:
server-addr: 47.110.152.217
server-addr: #

mybatis-plus:
mapper-locations: classpath:/mapper/**/*.xml
Expand Down
4 changes: 2 additions & 2 deletions gulimall-product/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ spring:
datasource:
username: root
password: root
url: jdbc:mysql://47.110.152.217:3306/gulimall_pms
url: jdbc:mysql://#:3306/gulimall_pms
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
max-lifetime: 10000
Expand All @@ -11,7 +11,7 @@ spring:
cloud:
nacos:
discovery:
server-addr: 47.110.152.217
server-addr: #
# 文件上传秘钥
alicloud:
access-key: LTAI4G36rcBvn3uGH4RgW9QL
Expand Down
2 changes: 1 addition & 1 deletion gulimall-product/src/main/resources/bootstrap.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spring.application.name=gulimall-product
spring.cloud.nacos.config.server-addr=47.110.152.217
spring.cloud.nacos.config.server-addr=#
spring.cloud.nacos.config.namespace=d1926eaf-43d4-482a-b5fd-2791fe441650
spring.cloud.nacos.config.file-extension=yaml
2 changes: 1 addition & 1 deletion gulimall-search/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ spring:
cloud:
nacos:
discovery:
server-addr: 47.110.152.217
server-addr: #
redis:
host: 192.168.56.102
session:
Expand Down
2 changes: 1 addition & 1 deletion gulimall-search/src/main/resources/bootstrap.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spring.application.name=gulimall-search
spring.cloud.nacos.config.server-addr=47.110.152.217
spring.cloud.nacos.config.server-addr=#
spring.cloud.nacos.config.namespace=1e1a1111-1d60-4e6b-87a7-b59866d1285b
spring.cloud.nacos.config.file-extension=yaml
12 changes: 6 additions & 6 deletions gulimall-third-party/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ spring:
cloud:
nacos:
discovery:
server-addr: 47.110.152.217:8848
server-addr: #:8848
alicloud:
access-key: LTAI4G36rcBvn3uGH4RgW9QL
secret-key: 8hbKqxS9oA7AsVcdmLDKeCrlSyGpJb
access-key: #
secret-key: #
oss:
bucket: gulimall-niceseason
endpoint: oss-cn-hangzhou.aliyuncs.com
# 发送短信接口的配置
sms:
host: http://dingxin.market.alicloudapi.com
path: /dx/sendSms
appcode: 0a118f8b1b3d43d5b10732a6caad9e0d
host: #
path: #
appcode: #

application:
name: gulimall-third-party
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spring.application.name=gulimall-third-party
spring.cloud.nacos.config.server-addr=47.110.152.217:8848
spring.cloud.nacos.config.server-addr=#:8848
spring.cloud.nacos.config.namespace=f8fb92e0-34a7-43e5-98d1-aadd12152158


Expand Down
4 changes: 2 additions & 2 deletions gulimall-ware/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# datasource:
# username: root
# password: root
# url: jdbc:mysql://47.110.152.217:3306/gulimall_wms
# url: jdbc:mysql://#:3306/gulimall_wms
# driver-class-name: com.mysql.cj.jdbc.Driver
# application:
# name: gulimall-ware
# cloud:
# nacos:
# discovery:
# server-addr: 47.110.152.217
# server-addr: #
#
#mybatis-plus:
# mapper-locations: classpath:/mapper/**/*.xml
Expand Down
2 changes: 1 addition & 1 deletion gulimall-ware/src/main/resources/bootstrap.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spring.application.name=gulimall-ware
spring.cloud.nacos.config.server-addr=47.110.152.217
spring.cloud.nacos.config.server-addr=#
spring.cloud.nacos.config.namespace=ef990659-440b-4755-95c5-a7d1260b2874
spring.cloud.nacos.config.file-extension=yaml
2 changes: 1 addition & 1 deletion renren-fast/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
druid:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://47.110.152.217:3306/gulimall-admin?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
url: jdbc:mysql://#:3306/gulimall-admin?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username: root
password: root
initial-size: 10
Expand Down
4 changes: 2 additions & 2 deletions renren-fast/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ spring:
cloud:
nacos:
discovery:
server-addr: 47.110.152.217:8848
server-addr: #:8848
config:
name: renren-fast
server-addr: 47.110.152.217
server-addr: #
namespace: 0a4ed40b-20a1-4f2c-a741-49279a883ffb


Expand Down
2 changes: 1 addition & 1 deletion renren-generator/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
#MySQL配置
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://47.110.152.217:3306/gulimall_wms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
url: jdbc:mysql://#:3306/gulimall_wms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: root
#oracle配置
Expand Down

0 comments on commit d766d0c

Please sign in to comment.