Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
059dbc6c
提交
059dbc6c
authored
4月 14, 2020
作者:
YunaiV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1. 引入 Spring Cloud Sentinel,后续做进一步集成
2. 重新搭建 Elasticsearch 服务,并接入 search 服务
上级
90391664
隐藏空白字符变更
内嵌
并排
正在显示
24 个修改的文件
包含
74 行增加
和
57 行删除
+74
-57
README.md
README.md
+13
-8
proxy.prod.js
admin-web/config/proxy/proxy.prod.js
+6
-6
pom.xml
common/common-dependencies/pom.xml
+8
-0
quick-start.md
docs/setup/quick-start.md
+1
-1
application.yaml
order/order-application/src/main/resources/application.yaml
+2
-2
application.yaml
...r-service-impl/src/main/resources/config/application.yaml
+1
-1
application.yaml
pay/pay-application/src/main/resources/application.yaml
+2
-2
application-test.yaml
...vice-impl/src/main/resources/config/application-test.yaml
+1
-1
application.yaml
...y-service-impl/src/main/resources/config/application.yaml
+2
-2
pom.xml
pom.xml
+1
-7
application.yaml
...t/product-application/src/main/resources/application.yaml
+2
-2
application.yaml
...t-service-impl/src/main/resources/config/application.yaml
+1
-1
application.yaml
...promotion-application/src/main/resources/application.yaml
+2
-2
pom.xml
promotion/promotion-service-impl/pom.xml
+0
-6
application.yaml
...n-service-impl/src/main/resources/config/application.yaml
+1
-1
application.yaml
...ch/search-application/src/main/resources/application.yaml
+2
-2
pom.xml
search/search-service-impl/pom.xml
+2
-2
application.yaml
...h-service-impl/src/main/resources/config/application.yaml
+7
-2
ProductSearchServiceImplTest.java
...mall/search/biz/service/ProductSearchServiceImplTest.java
+4
-0
pom.xml
system/system-application/pom.xml
+0
-6
application.yaml
...em/system-application/src/main/resources/application.yaml
+7
-0
pom.xml
user/user-application/pom.xml
+6
-0
application.yaml
user/user-application/src/main/resources/application.yaml
+2
-2
application.yaml
...r-service-impl/src/main/resources/config/application.yaml
+1
-1
没有找到文件。
README.md
浏览文件 @
059dbc6c
...
...
@@ -67,9 +67,11 @@
**SkyWalking UI**
*
地址:http://skywalking
-ui.shop.iocoder.cn:18099
*
地址:http://skywalking
.shop.iocoder.cn
*
管理员账号:admin / admin
> 教程:[《芋道 SkyWalking 安装部署》](http://www.iocoder.cn/SkyWalking/install/?onemall)
**Grafana UI**
*
地址:http://grafana.shop.iocoder.cn:18099
...
...
@@ -83,19 +85,22 @@
**RocketMQ Console**
*
地址:http://rocketmq-console.shop.iocoder.cn:18099
*
管理员账号:admin / RPsa2GHjTNs8pxEU
**Sentinel Console**
*
地址:http://rocketmq.shop.iocoder.cn
*
地址:http://sentinel.shop.iocoder.cn:18099
*
账号:sentinel / sentinel
> 教程:[《芋道 RocketMQ 安装部署》](http://www.iocoder.cn/RocketMQ/install/?onemall)
**XXL-Job Console**
*
地址:http://job
-console.shop.iocoder.cn:18099
*
地址:http://job
.shop.iocoder.cn
*
管理员账号:admin / 233666
> 教程:[《芋道 RocketMQ 安装部署》](http://www.iocoder.cn/XXL-JOB/install/?onemall)
**Sentinel Console**
*
地址:http://sentinel.shop.iocoder.cn:18099
*
账号:sentinel / sentinel
# 技术
## 搭建环境
...
...
admin-web/config/proxy/proxy.prod.js
浏览文件 @
059dbc6c
...
...
@@ -2,32 +2,32 @@
module
.
exports
=
{
'/admin-api/'
:
{
target
:
'http://api.shop.iocoder.cn
:18099
'
,
target
:
'http://api.shop.iocoder.cn'
,
changeOrigin
:
true
,
pathRewrite
:
{},
},
'/product-api/'
:
{
target
:
'http://api.shop.iocoder.cn
:18099
'
,
target
:
'http://api.shop.iocoder.cn'
,
changeOrigin
:
true
,
pathRewrite
:
{},
},
'/order-api/'
:
{
target
:
'http://api.shop.iocoder.cn
:18099
'
,
target
:
'http://api.shop.iocoder.cn'
,
changeOrigin
:
true
,
pathRewrite
:
{},
},
'/promotion-api/'
:
{
target
:
'http://api.shop.iocoder.cn
:18099
'
,
target
:
'http://api.shop.iocoder.cn'
,
changeOrigin
:
true
,
pathRewrite
:
{},
},
'/pay-api/'
:
{
target
:
'http://api.shop.iocoder.cn
:18099
'
,
target
:
'http://api.shop.iocoder.cn'
,
changeOrigin
:
true
,
pathRewrite
:
{},
},
'/user-api/'
:
{
target
:
'http://api.shop.iocoder.cn
:18099
'
,
target
:
'http://api.shop.iocoder.cn'
,
changeOrigin
:
true
,
pathRewrite
:
{},
},
...
...
common/common-dependencies/pom.xml
浏览文件 @
059dbc6c
...
...
@@ -24,6 +24,8 @@
<dubbo.version>
2.7.1
</dubbo.version>
<!-- Transaction 相关 -->
<seata.version>
1.1.0
</seata.version>
<!-- 监控相关 -->
<skywalking.version>
7.0.0
</skywalking.version>
</properties>
<!-- 依赖管理 -->
...
...
@@ -66,6 +68,12 @@
<version>
${seata.version}
</version>
</dependency>
<!-- 监控相关 -->
<dependency>
<groupId>
org.apache.skywalking
</groupId>
<artifactId>
apm-toolkit-trace
</artifactId>
<version>
${skywalking.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
...
...
docs/setup/quick-start.md
浏览文件 @
059dbc6c
...
...
@@ -41,7 +41,7 @@
spring:
# datasource
datasource:
url: jdbc:mysql://
180.167.213.26:1
3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8 # 请修改成你本地的 MySQL url
url: jdbc:mysql://
s1.iocoder.cn:
3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8 # 请修改成你本地的 MySQL url
driver-class-name: com.mysql.jdbc.Driver
username: root # 请修改成你本地的 MySQL username
password: ${MALL_MYSQL_PASSWORD} # 请修改成你本地的 MySQL password
...
...
order/order-application/src/main/resources/application.yaml
浏览文件 @
059dbc6c
...
...
@@ -7,8 +7,8 @@ spring:
# Spring Cloud Sentinel 配置项
sentinel
:
transport
:
dashboard
:
localhost:12088
eager
:
false
dashboard
:
s1.iocoder.cn:12088
# Sentinel Dashboard 服务地址
eager
:
true
# 项目启动时,直接连接到 Sentinel
# server
server
:
...
...
order/order-service-impl/src/main/resources/config/application.yaml
浏览文件 @
059dbc6c
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://
180.167.213.26:1
3306/mall_order?useSSL=false&useUnicode=true&characterEncoding=UTF-8
url
:
jdbc:mysql://
s1.iocoder.cn:
3306/mall_order?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
...
...
pay/pay-application/src/main/resources/application.yaml
浏览文件 @
059dbc6c
...
...
@@ -7,8 +7,8 @@ spring:
# Spring Cloud Sentinel 配置项
sentinel
:
transport
:
dashboard
:
localhost:12088
eager
:
false
dashboard
:
s1.iocoder.cn:12088
# Sentinel Dashboard 服务地址
eager
:
true
# 项目启动时,直接连接到 Sentinel
# server
server
:
...
...
pay/pay-service-impl/src/main/resources/config/application-test.yaml
浏览文件 @
059dbc6c
...
...
@@ -2,7 +2,7 @@
xxl
:
job
:
admin
:
addresses
:
http://
127.0.0.1
:18079/
addresses
:
http://
s1.iocoder.cn
:18079/
executor
:
appname
:
pay-job-executor
ip
:
...
...
pay/pay-service-impl/src/main/resources/config/application.yaml
浏览文件 @
059dbc6c
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://
180.167.213.26:1
3306/mall_pay?useSSL=false&useUnicode=true&characterEncoding=UTF-8
url
:
jdbc:mysql://
s1.iocoder.cn:
3306/mall_pay?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
...
...
@@ -44,7 +44,7 @@ dubbo:
# rocketmq
rocketmq
:
name-server
:
127.0.0.1
:9876
name-server
:
s1.iocoder.cn
:9876
producer
:
group
:
pay-producer-group
...
...
pom.xml
浏览文件 @
059dbc6c
...
...
@@ -52,7 +52,6 @@
<org.projectlombok.version>
1.16.14
</org.projectlombok.version>
<qiniu.version>
7.2.18
</qiniu.version>
<skywalking.version>
6.1.0
</skywalking.version>
<servlet.version>
2.5
</servlet.version>
...
...
@@ -177,12 +176,7 @@
<version>
${qiniu.version}
</version>
</dependency>
<!-- 监控相关 -->
<dependency>
<groupId>
org.apache.skywalking
</groupId>
<artifactId>
apm-toolkit-trace
</artifactId>
<version>
${skywalking.version}
</version>
</dependency>
<dependency>
<groupId>
de.codecentric
</groupId>
...
...
product/product-application/src/main/resources/application.yaml
浏览文件 @
059dbc6c
...
...
@@ -7,8 +7,8 @@ spring:
# Spring Cloud Sentinel 配置项
sentinel
:
transport
:
dashboard
:
localhost:12088
eager
:
false
dashboard
:
s1.iocoder.cn:12088
# Sentinel Dashboard 服务地址
eager
:
true
# 项目启动时,直接连接到 Sentinel
# server
server
:
...
...
product/product-service-impl/src/main/resources/config/application.yaml
浏览文件 @
059dbc6c
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://
180.167.213.26:1
3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8
url
:
jdbc:mysql://
s1.iocoder.cn:
3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
...
...
promotion/promotion-application/src/main/resources/application.yaml
浏览文件 @
059dbc6c
...
...
@@ -7,8 +7,8 @@ spring:
# Spring Cloud Sentinel 配置项
sentinel
:
transport
:
dashboard
:
localhost:12088
eager
:
false
dashboard
:
s1.iocoder.cn:12088
# Sentinel Dashboard 服务地址
eager
:
true
# 项目启动时,直接连接到 Sentinel
# server
server
:
...
...
promotion/promotion-service-impl/pom.xml
浏览文件 @
059dbc6c
...
...
@@ -72,12 +72,6 @@
<artifactId>
spring-cloud-alibaba-seata
</artifactId>
</dependency>
<!-- MQ 相关 -->
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-stream-rocketmq
</artifactId>
</dependency>
<!-- Job 相关 -->
<dependency>
<groupId>
com.xuxueli
</groupId>
...
...
promotion/promotion-service-impl/src/main/resources/config/application.yaml
浏览文件 @
059dbc6c
...
...
@@ -2,7 +2,7 @@ spring:
# datasource
datasource
:
type
:
com.alibaba.druid.pool.DruidDataSource
url
:
jdbc:mysql://
180.167.213.26:1
3306/mall_promotion?useSSL=false&useUnicode=true&characterEncoding=UTF-8
url
:
jdbc:mysql://
s1.iocoder.cn:
3306/mall_promotion?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
...
...
search/search-application/src/main/resources/application.yaml
浏览文件 @
059dbc6c
...
...
@@ -7,8 +7,8 @@ spring:
# Spring Cloud Sentinel 配置项
sentinel
:
transport
:
dashboard
:
localhost:12088
eager
:
false
dashboard
:
s1.iocoder.cn:12088
# Sentinel Dashboard 服务地址
eager
:
true
# 项目启动时,直接连接到 Sentinel
# server
server
:
...
...
search/search-service-impl/pom.xml
浏览文件 @
059dbc6c
...
...
@@ -15,12 +15,12 @@
<!-- Mall 相关 -->
<dependency>
<groupId>
cn.iocoder.mall
</groupId>
<artifactId>
search-service-api
</artifactId>
<artifactId>
mall-spring-boot
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
cn.iocoder.mall
</groupId>
<artifactId>
mall-spring-boot
</artifactId>
<artifactId>
search-service-api
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
...
...
search/search-service-impl/src/main/resources/config/application.yaml
浏览文件 @
059dbc6c
# es
spring
:
application
:
name
:
search-application
data
:
elasticsearch
:
cluster-name
:
elasticsearch
cluster-nodes
:
180.167.213.26
:9300
cluster-nodes
:
s1.iocoder.cn
:9300
repositories
:
enable
:
true
elasticsearch
:
rest
:
uris
:
s1.iocoder.cn:9200
# Spring Cloud 配置项
cloud
:
...
...
@@ -44,6 +49,6 @@ dubbo:
# rocketmq
rocketmq
:
name-server
:
127.0.0.1
:9876
name-server
:
s1.iocoder.cn
:9876
producer
:
group
:
search-producer-group
search/search-service-impl/src/test/java/cn/iocoder/mall/search/biz/service/ProductSearchServiceImplTest.java
浏览文件 @
059dbc6c
...
...
@@ -16,6 +16,10 @@ public class ProductSearchServiceImplTest {
@Autowired
private
ProductRepository
productRepository
;
static
{
System
.
setProperty
(
"es.set.netty.runtime.available.processors"
,
"false"
);
}
@Test
public
void
testRebuild
()
{
int
counts
=
productSearchService
.
rebuild
();
...
...
system/system-application/pom.xml
浏览文件 @
059dbc6c
...
...
@@ -84,12 +84,6 @@
<scope>
test
</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-devtools</artifactId>-->
<!-- <optional>true</optional>-->
<!-- </dependency>-->
</dependencies>
<build>
...
...
system/system-application/src/main/resources/application.yaml
浏览文件 @
059dbc6c
...
...
@@ -2,6 +2,13 @@ spring:
application
:
name
:
admin-application
# Spring Cloud 配置项
cloud
:
# Spring Cloud Sentinel 配置项
sentinel
:
transport
:
dashboard
:
s1.iocoder.cn:12088
# Sentinel Dashboard 服务地址
eager
:
true
# 项目启动时,直接连接到 Sentinel
# server
server
:
...
...
user/user-application/pom.xml
浏览文件 @
059dbc6c
...
...
@@ -62,6 +62,12 @@
<artifactId>
swagger-bootstrap-ui
</artifactId>
</dependency>
<!-- 服务保障相关 -->
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-sentinel
</artifactId>
</dependency>
<!-- 监控相关 -->
<dependency>
...
...
user/user-application/src/main/resources/application.yaml
浏览文件 @
059dbc6c
...
...
@@ -7,8 +7,8 @@ spring:
# Spring Cloud Sentinel 配置项
sentinel
:
transport
:
dashboard
:
localhost:12088
eager
:
false
dashboard
:
s1.iocoder.cn:12088
# Sentinel Dashboard 服务地址
eager
:
true
# 项目启动时,直接连接到 Sentinel
# server
server
:
...
...
user/user-service-impl/src/main/resources/config/application.yaml
浏览文件 @
059dbc6c
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://
180.167.213.26:1
3306/mall_user?useSSL=false&useUnicode=true&characterEncoding=UTF-8
url
:
jdbc:mysql://
s1.iocoder.cn:
3306/mall_user?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论