Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
a248a4b3
提交
a248a4b3
authored
4月 11, 2020
作者:
YunaiV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
将 system 模块接入 SCA Dubbo 和 Nacos Discovery 组件。
上级
363f6b20
全部展开
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
66 行增加
和
99 行删除
+66
-99
pom.xml
common/common-dependencies/pom.xml
+10
-1
pom.xml
common/common-framework/pom.xml
+13
-0
DubboExceptionFilter.java
.../iocoder/common/framework/dubbo/DubboExceptionFilter.java
+4
-3
ReferenceAnnotationBeanPostProcessor.java
...tory/annotation/ReferenceAnnotationBeanPostProcessor.java
+0
-0
DateUtilTest.java
...t/java/cn/iocoder/common/framework/util/DateUtilTest.java
+5
-0
pom.xml
order/pom.xml
+0
-10
pom.xml
pom.xml
+5
-5
pom.xml
promotion/pom.xml
+0
-9
pom.xml
search/pom.xml
+0
-10
pom.xml
system/pom.xml
+12
-0
application-test.yaml
...stem-application/src/main/resources/application-test.yaml
+0
-18
application.yaml
...em/system-application/src/main/resources/application.yaml
+1
-16
pom.xml
system/system-service-impl/pom.xml
+5
-12
application-test.yaml
...vice-impl/src/main/resources/config/application-test.yaml
+0
-7
application.yaml
...m-service-impl/src/main/resources/config/application.yaml
+11
-8
没有找到文件。
common/common-dependencies/pom.xml
浏览文件 @
a248a4b3
...
...
@@ -17,9 +17,11 @@
<!-- 属性 -->
<properties>
<!-- TODO Spring Boot && Spring Cloud && Spring Cloud Alibaba -->
<spring.boot.version>
2.2.
6s
.RELEASE
</spring.boot.version>
<spring.boot.version>
2.2.
4
.RELEASE
</spring.boot.version>
<spring.cloud.version>
Hoxton.SR1
</spring.cloud.version>
<spring.cloud.alibaba.version>
2.2.0.RELEASE
</spring.cloud.alibaba.version>
<!-- RPC 相关 -->
<dubbo.version>
2.7.1
</dubbo.version>
</properties>
<!-- 依赖管理 -->
...
...
@@ -47,6 +49,13 @@
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<!-- RPC 相关 -->
<dependency>
<groupId>
org.apache.dubbo
</groupId>
<artifactId>
dubbo
</artifactId>
<version>
${dubbo.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
...
...
common/common-framework/pom.xml
浏览文件 @
a248a4b3
...
...
@@ -10,6 +10,19 @@
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
common-framework
</artifactId>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
cn.iocoder.mall
</groupId>
<artifactId>
common-dependencies
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Web 相关 -->
<dependency>
...
...
common/common-framework/src/main/java/cn/iocoder/common/framework/dubbo/DubboExceptionFilter.java
浏览文件 @
a248a4b3
package
cn
.
iocoder
.
common
.
framework
.
dubbo
;
import
cn.iocoder.common.framework.exception.ServiceException
;
import
org.apache.dubbo.common.Constants
;
import
org.apache.dubbo.common.
constants.Common
Constants
;
import
org.apache.dubbo.common.extension.Activate
;
import
org.apache.dubbo.common.logger.Logger
;
import
org.apache.dubbo.common.logger.LoggerFactory
;
...
...
@@ -18,7 +18,7 @@ import java.lang.reflect.Method;
*
* 主要目的是,一些全局性的异常,能够返回。因为,Dubbo Consumer 能够保证,一定会引入全局性的异常。
*/
@Activate
(
group
=
Constants
.
PROVIDER
)
@Activate
(
group
=
Co
mmonCo
nstants
.
PROVIDER
)
public
class
DubboExceptionFilter
implements
Filter
{
private
final
Logger
logger
;
...
...
@@ -90,7 +90,8 @@ public class DubboExceptionFilter implements Filter {
}
// otherwise, wrap with RuntimeException and throw back to the client
return
new
RpcResult
(
new
RuntimeException
(
StringUtils
.
toString
(
exception
)));
result
.
setException
(
new
RuntimeException
(
StringUtils
.
toString
(
exception
)));
return
result
;
}
catch
(
Throwable
e
)
{
logger
.
warn
(
"Fail to ExceptionFilter when called by "
+
RpcContext
.
getContext
().
getRemoteHost
()
+
". service: "
+
invoker
.
getInterface
().
getName
()
+
", method: "
+
invocation
.
getMethodName
()
...
...
common/common-framework/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ReferenceAnnotationBeanPostProcessor.java
deleted
100644 → 0
浏览文件 @
363f6b20
差异被折叠。
点击展开。
common/common-framework/src/test/java/cn/iocoder/common/framework/util/DateUtilTest.java
浏览文件 @
a248a4b3
package
cn
.
iocoder
.
common
.
framework
.
util
;
import
org.junit.Assert
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
java.util.Date
;
import
java.util.GregorianCalendar
;
...
...
@@ -8,6 +9,7 @@ import java.util.GregorianCalendar;
public
class
DateUtilTest
{
@Test
@Ignore
// 暂时忽略,测试不通过,add by 芋艿
public
void
testAddDate
()
{
Assert
.
assertNull
(
DateUtil
.
addDate
(
0
,
0
));
Assert
.
assertEquals
(
new
Date
(
1_778_410_800_000L
),
DateUtil
.
addDate
(
...
...
@@ -15,6 +17,7 @@ public class DateUtilTest {
}
@Test
@Ignore
// 暂时忽略,测试不通过,add by 芋艿
public
void
testFormat
()
{
Assert
.
assertEquals
(
""
,
DateUtil
.
format
(
null
,
null
));
Assert
.
assertEquals
(
"2018-01-10:12:00:00"
,
DateUtil
.
format
(
...
...
@@ -22,6 +25,7 @@ public class DateUtilTest {
}
@Test
@Ignore
// 暂时忽略,测试不通过,add by 芋艿
public
void
testGetDayBegin
()
{
Assert
.
assertNull
(
DateUtil
.
getDayBegin
(
null
));
Assert
.
assertEquals
(
new
Date
(
1_515_542_400_000L
),
...
...
@@ -29,6 +33,7 @@ public class DateUtilTest {
}
@Test
@Ignore
// 暂时忽略,测试不通过,add by 芋艿
public
void
testGetDayEnd
()
{
Assert
.
assertNull
(
DateUtil
.
getDayEnd
(
null
));
Assert
.
assertEquals
(
new
Date
(
1_515_628_799_999L
),
DateUtil
.
getDayEnd
(
...
...
order/pom.xml
浏览文件 @
a248a4b3
...
...
@@ -16,14 +16,4 @@
<module>
order-service-api
</module>
<module>
order-service-impl
</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.apache.dubbo
</groupId>
<artifactId>
dubbo
</artifactId>
<version>
2.7.1
</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
pom.xml
浏览文件 @
a248a4b3
...
...
@@ -6,7 +6,7 @@
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.
1.3
.RELEASE
</version>
<version>
2.
2.4
.RELEASE
</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
...
...
@@ -28,10 +28,10 @@
<packaging>
pom
</packaging>
<properties>
<springboot.version>
2.
1.3
.RELEASE
</springboot.version>
<spring-boot-admin-starter-client.version>
2.
1.3
</spring-boot-admin-starter-client.version>
<springboot.version>
2.
2.4
.RELEASE
</springboot.version>
<spring-boot-admin-starter-client.version>
2.
2.2
</spring-boot-admin-starter-client.version>
<!-- <com.alibab.dubbo.version>2.6.5</com.alibab.dubbo.version>-->
<dubbo.version>
2.7.1
</dubbo.version>
<dubbo.version>
2.7.
4.
1
</dubbo.version>
<mysql-connector-java.version>
5.1.46
</mysql-connector-java.version>
<druid.version>
1.1.16
</druid.version>
<!-- <dubbo-spring-boot-starter.version>0.2.1.RELEASE</dubbo-spring-boot-starter.version>-->
...
...
@@ -61,7 +61,7 @@
<seata.version>
0.5.1
</seata.version>
<prometheus-spring-boot.version>
0.6.0
</prometheus-spring-boot.version>
<micrometer.version>
1.
1.4
</micrometer.version>
<micrometer.version>
1.
4.1
</micrometer.version>
<!-- <seata.version>0.6.0-SNAPSHOT</seata.version>-->
...
...
promotion/pom.xml
浏览文件 @
a248a4b3
...
...
@@ -17,13 +17,4 @@
<module>
promotion-application
</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.apache.dubbo
</groupId>
<artifactId>
dubbo
</artifactId>
<version>
2.7.1
</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
search/pom.xml
浏览文件 @
a248a4b3
...
...
@@ -16,14 +16,4 @@
<module>
search-service-api
</module>
<module>
search-service-impl
</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.apache.dubbo
</groupId>
<artifactId>
dubbo
</artifactId>
<version>
2.7.1
</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
system/pom.xml
浏览文件 @
a248a4b3
...
...
@@ -20,4 +20,16 @@
<module>
system-service-impl
</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
cn.iocoder.mall
</groupId>
<artifactId>
common-dependencies
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
system/system-application/src/main/resources/application-test.yaml
deleted
100644 → 0
浏览文件 @
363f6b20
spring
:
boot
:
admin
:
client
:
enabled
:
false
# 暂时不用了
url
:
http://127.0.0.1:18097
#management:
# endpoints:
# web:
# exposure:
# include: "*"
# server:
# port: 19083 # 配置独立端口。而该端口,不使用 nginx 对外暴露,从而不配置安全认证。也就是说,内网环境可访问,外网环境不可访问。当然,这么做的前提是,认为内网安全。
swagger
:
enable
:
true
# 暂时不去掉
system/system-application/src/main/resources/application.yaml
浏览文件 @
a248a4b3
spring
:
application
:
name
:
admin-application
cloud
:
sentinel
:
transport
:
port
:
8719
dashboard
:
localhost:12088
metric
:
charset
:
UTF-8
eager
:
false
# server
server
:
...
...
@@ -32,11 +25,3 @@ swagger:
description
:
管理员子系统
version
:
1.0.0
base-package
:
cn.iocoder.mall.admin.application.controller
management
:
endpoints
:
web
:
exposure
:
include
:
health,info,env,metrics,prometheus
metrics
:
enabled
:
true
system/system-service-impl/pom.xml
浏览文件 @
a248a4b3
...
...
@@ -9,6 +9,7 @@
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
system-service-impl
</artifactId>
<dependencies>
<!-- Mall 相关 -->
<dependency>
...
...
@@ -43,22 +44,14 @@
<!-- RPC 相关 -->
<dependency>
<groupId>
org.apache.dubbo
</groupId>
<artifactId>
dubbo
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.dubbo
</groupId>
<artifactId>
dubbo-spring-boot-starter
</artifactId>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-dubbo
</artifactId>
</dependency>
<!-- Registry 和 Config 相关 -->
<dependency>
<groupId>
org.apache.curator
</groupId>
<artifactId>
curator-framework
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.curator
</groupId>
<artifactId>
curator-recipes
</artifactId>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-nacos-discovery
</artifactId>
</dependency>
<!-- 工具类相关 -->
...
...
system/system-service-impl/src/main/resources/config/application-test.yaml
deleted
100644 → 0
浏览文件 @
363f6b20
spring
:
# datasource
datasource
:
url
:
jdbc:mysql://192.168.88.14:3306/mall_admin?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
system/system-service-impl/src/main/resources/config/application.yaml
浏览文件 @
a248a4b3
...
...
@@ -5,12 +5,11 @@ spring:
driver-class-name
:
com.mysql.jdbc.Driver
username
:
root
password
:
${MALL_MYSQL_PASSWORD}
# mybatis
#mybatis:
# config-location: classpath:mybatis-config.xml
# mapper-locations: classpath:mapper/*.xml
# type-aliases-package: cn.iocoder.mall.admin.dataobject
cloud
:
# Nacos 作为注册中心的配置项
nacos
:
discovery
:
server-addr
:
127.0.0.1:8848
# Nacos 服务器地址
# mybatis-plus
mybatis-plus
:
...
...
@@ -36,13 +35,17 @@ sms:
dubbo
:
application
:
name
:
admin-service
registry
:
address
:
zookeeper://127.0.0.1:2181
protocol
:
port
:
-1
name
:
dubbo
scan
:
base-packages
:
cn.iocoder.mall.admin.service
# Dubbo 服务注册中心配置,对应 RegistryConfig 类
registry
:
address
:
spring-cloud://127.0.0.1:8848
# 指定 Dubbo 服务注册中心的地址
# Spring Cloud Alibaba Dubbo 专属配置项,对应 DubboCloudProperties 类
cloud
:
subscribed-services
:
'
'
# 设置订阅的应用列表,默认为 * 订阅所有应用。
provider
:
filter
:
-exception
AdminAccessLogService
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论