将 system 模块接入 SCA Dubbo 和 Nacos Discovery 组件。
This commit is contained in:
@@ -20,4 +20,16 @@
|
||||
<module>system-service-impl</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
<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>
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
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 # 暂时不去掉
|
||||
@@ -1,14 +1,7 @@
|
||||
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
|
||||
|
||||
@@ -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>
|
||||
|
||||
<!-- 工具类相关 -->
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
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}
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user