feat:修复已知问题,提升系统稳定性
This commit is contained in:
26
README.md
26
README.md
@@ -1,8 +1,8 @@
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">Startdis Cloud</h1>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">Remi Cloud</h1>
|
||||
|
||||
## 平台简介
|
||||
|
||||
Startdis Cloud 即 Startdis Dev Tools 启迪快速开发平台的多模块微服务开发框架。由[江苏点九科技有限公司](https://dianjiu.cc)提供技术支持。
|
||||
Remi Cloud 即 Remi Dev Tools 启迪快速开发平台的多模块微服务开发框架。由[江苏点九科技有限公司](https://dianjiu.cc)提供技术支持。
|
||||
|
||||
### 分支说明
|
||||
|
||||
@@ -17,25 +17,25 @@ https://www.yuque.com/dianjiuxyz/vpdfr9
|
||||
|
||||
### 体验地址
|
||||
|
||||
https://sdt.startdis.com
|
||||
https://sdt.remi.com
|
||||
|
||||
startdis/startdis2022
|
||||
remi/remi2022
|
||||
|
||||
### 其他产品
|
||||
|
||||
- 👉🏻 [自研 IAM 统一身份引擎](https://iam.startdis.com)
|
||||
- 👉🏻 [自研 IAM 统一身份引擎](https://iam.remi.com)
|
||||
|
||||
- 👉🏻 [自研 BPM 统一流程引擎](https://bpm.startdis.com)
|
||||
- 👉🏻 [自研 BPM 统一流程引擎](https://bpm.remi.com)
|
||||
|
||||
- 👉🏻 [自研 LCE 低代码引擎](https://lce.startdis.com)
|
||||
- 👉🏻 [自研 LCE 低代码引擎](https://lce.remi.com)
|
||||
|
||||
## 快速开始
|
||||
|
||||
### 模块说明
|
||||
~~~
|
||||
startdis-boot
|
||||
remi-demo
|
||||
├── docs // 说明文档
|
||||
└── sdt-comm // 公共模块
|
||||
└── remi-comm // 公共模块
|
||||
├── comm-auth // 权限控制
|
||||
├── comm-core // 核心模块
|
||||
├── comm-domain // 领域模型
|
||||
@@ -63,9 +63,9 @@ startdis-boot
|
||||
├── comm-security // 安全模块
|
||||
├── comm-swagger // 系统接口
|
||||
├── pom.xml // 公共依赖
|
||||
└── sdt-iam // 身份引擎(统一身份管理)
|
||||
└── sdt-bpm // 流程引擎(统一流程管理)
|
||||
└── sdt-xpe // 插件引擎(插件拓展平台)
|
||||
└── sdt-lce // 代码引擎(低代码平台)
|
||||
└── remi-sys // 身份引擎(统一身份管理)
|
||||
└── remi-bpm // 流程引擎(统一流程管理)
|
||||
└── remi-xpe // 插件引擎(插件拓展平台)
|
||||
└── remi-lce // 代码引擎(低代码平台)
|
||||
~~~
|
||||
|
||||
|
||||
13
derby.log
Normal file
13
derby.log
Normal file
@@ -0,0 +1,13 @@
|
||||
----------------------------------------------------------------
|
||||
Fri Aug 30 00:51:04 CST 2024:
|
||||
Booting Derby version The Apache Software Foundation - Apache Derby - 10.14.2.0 - (1828579): instance a816c00e-0191-9f0c-2ce5-0000036aae18
|
||||
on database directory memory:D:\Codes\remi\remi-cloud\dfd497d2-d2b5-4bc0-86c9-059abfd1e783 with class loader jdk.internal.loader.ClassLoaders$AppClassLoader@60e53b93
|
||||
Loaded from file:/D:/Maven/sdt-repository/org/apache/derby/derby/10.14.2.0/derby-10.14.2.0.jar
|
||||
java.vendor=Amazon.com Inc.
|
||||
java.runtime.version=17.0.11+9-LTS
|
||||
user.dir=D:\Codes\remi\remi-cloud
|
||||
os.name=Windows 11
|
||||
os.arch=amd64
|
||||
os.version=10.0
|
||||
derby.system.home=null
|
||||
Database Class Loader started - derby.database.classpath=''
|
||||
111
docs/config/config/application-local.yml
Normal file
111
docs/config/config/application-local.yml
Normal file
@@ -0,0 +1,111 @@
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: local
|
||||
servlet:
|
||||
multipart:
|
||||
# 上传文件总的最大值
|
||||
max-request-size: 100MB
|
||||
# 单个文件的最大值
|
||||
max-file-size: 100MB
|
||||
datasource:
|
||||
# mysql
|
||||
url: jdbc:mysql://192.168.2.202:3306/remi-paas-ids?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false&nullCatalogMeansCurrent=true
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: Sdt@1020
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
# 下面为连接池的补充设置,应用到上面所有数据源中
|
||||
# 初始化大小,最小,最大
|
||||
initial-size: 5
|
||||
min-idle: 5
|
||||
max-active: 20
|
||||
# 配置获取连接等待超时的时间
|
||||
max-wait: 60000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
time-between-eviction-runs-millis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
min-evictable-idle-time-millis: 300000
|
||||
# mysql
|
||||
validation-query: SELECT 1 FROM DUAL
|
||||
# postgre
|
||||
#validation-query: SELECT 1
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
# 打开PSCache,并且指定每个连接上PSCache的大小
|
||||
pool-prepared-statements: true
|
||||
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
filters: stat,wall
|
||||
use-global-data-source-stat: true
|
||||
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||||
connect-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
redis:
|
||||
database: 0
|
||||
host: 192.168.2.202
|
||||
password:
|
||||
port: 6379
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 8
|
||||
max-idle: 8
|
||||
min-idle: 0
|
||||
timeout: 1000
|
||||
# MinIO
|
||||
minio:
|
||||
#对象存储服务的URL
|
||||
url: http://192.168.2.202:9000
|
||||
#账户
|
||||
accessKey: admin
|
||||
#密码
|
||||
secretKey: Sdt@1020
|
||||
#存储桶
|
||||
bucketName: remi-paas-ids
|
||||
# 异步线程配置
|
||||
async:
|
||||
executor:
|
||||
thread:
|
||||
# 核心线程数
|
||||
corePoolSize: 5
|
||||
# 最大线程数
|
||||
maxPoolSize: 20
|
||||
# 任务队列大小
|
||||
queueCapacity: 1000
|
||||
# 缓冲队列中线程的空闲时间
|
||||
keepAliveSeconds: 3000
|
||||
|
||||
# 拦截器
|
||||
sql-intercept:
|
||||
tenant:
|
||||
deptTenant:
|
||||
enable: true
|
||||
companyTenant:
|
||||
enable: true
|
||||
anonUrlSet: /user/getUserInfoByUserCode,/appInfo/list,/common/getUserInfo,/dept/getDeptByUserCode,/company/getCompanyInfoById,/operateLog/add,/operateLog/page,/operateLog/logPage
|
||||
field-fill:
|
||||
createdByIntercept:
|
||||
enable: true
|
||||
updateByIntercept:
|
||||
enable: true
|
||||
createAtIntercept:
|
||||
enable: true
|
||||
updateAtIntercept:
|
||||
enable: true
|
||||
|
||||
## 开启店铺id 拦截器
|
||||
interceptor:
|
||||
company:
|
||||
enabled: true
|
||||
|
||||
# 开启系统操作日志
|
||||
log:
|
||||
record:
|
||||
enabled: true
|
||||
pushUrl: http://localhost:6103/operateLog/add
|
||||
appName: IDS
|
||||
|
||||
# 日志输出路径配置
|
||||
logback:
|
||||
# logDir: /Users/dianjiu/Logs/remi/remi-ids-web
|
||||
logDir: D:\\Logs\\sdt\\paas\\remi-ids-web
|
||||
100
docs/config/config/application.yml
Normal file
100
docs/config/config/application.yml
Normal file
@@ -0,0 +1,100 @@
|
||||
# 服务端口号
|
||||
server:
|
||||
port: 8081
|
||||
# tomcat 配置
|
||||
tomcat:
|
||||
# tomcat的URI编码
|
||||
uri-encoding: UTF-8
|
||||
# tomcat最大线程数,默认为200
|
||||
max-threads: 500
|
||||
# Tomcat启动初始化的线程数,默认值25
|
||||
min-spare-threads: 30
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: remi-ids-web
|
||||
profiles:
|
||||
active: ${cfg.env}
|
||||
# 循环依赖的问题
|
||||
main:
|
||||
allow-circular-references: true
|
||||
# MVC默认的路径匹配策略为PATH_PATTERN_PARSER,需要修改为ANT_PATH_MATCHER 解决swagger兼容性问题
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ANT_PATH_MATCHER
|
||||
|
||||
# mybatis-plus
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
#控制台打印完整带参数SQL语句
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
#mapper映射文件路径
|
||||
mapper-locations: classpath*:/*-infra/src/main/resources/mapper/*.xml,classpath*:/common-log/src/main/resources/mapper/*.xml, classpath*:/mapper/**.xml
|
||||
|
||||
#pagehelper
|
||||
pagehelper:
|
||||
# helper-dialect: mysql
|
||||
#分页插件会自动检测当前的数据库链接,自动选择合适的分页方式。 你可以配置helperDialect 属性来指定分页插件使用哪种方言。
|
||||
auto-runtime-dialect: true
|
||||
#分页合理化参数,默认值为 false 。当该参数设置为 true 时, pageNum<=0 时会查询第一页, pageNum>pages (超过总数时),会查询最后一页。
|
||||
reasonable: true
|
||||
#支持通过Mapper接口参数传递page参数,默认值为false
|
||||
support-methods-arguments: true
|
||||
#默认值为 false ,当该参数设置为 true 时,如果 pageSize=0 或者 RowBounds.limit =0 就会查询出全部的结果(相当于没有执行分页查询,但是返回结果仍然是 Page 类型)。
|
||||
page-size-zero: true
|
||||
#为了支持 startPage(Object params) 方法,增加了该参数来配置参数映射,用于从对象中根据属性名取值
|
||||
params: count=countSql
|
||||
|
||||
# feign
|
||||
feign:
|
||||
okhttp:
|
||||
enabled: true
|
||||
sentinel:
|
||||
enabled: true
|
||||
client:
|
||||
config:
|
||||
default:
|
||||
connectTimeout: 100000
|
||||
readTimeout: 100000
|
||||
|
||||
# knife4j配置
|
||||
knife4j:
|
||||
#启用
|
||||
enable: true
|
||||
#基础认证
|
||||
basic:
|
||||
enable: false
|
||||
username: remi
|
||||
password: 123456
|
||||
#增强配置
|
||||
setting:
|
||||
enableSwaggerModels: true
|
||||
enableDocumentManage: true
|
||||
enableHost: false
|
||||
enableHostText: http://localhost
|
||||
enableRequestCache: true
|
||||
enableFilterMultipartApis: false
|
||||
enableFilterMultipartApiMethodType: POST
|
||||
language: zh-CN
|
||||
enableFooter: false
|
||||
enableFooterCustom: true
|
||||
footerCustomContent: Copyright © 2021 Remi All Rights Reserved
|
||||
|
||||
# 定义日志输出级别
|
||||
logging:
|
||||
config: classpath:logback-spring.xml
|
||||
level:
|
||||
ai.remi: info
|
||||
#spring 包日志输出级别
|
||||
org.springframework: info
|
||||
com.alibaba.cloud: info
|
||||
# undertow
|
||||
io.undertow: info
|
||||
# mybatis-plus
|
||||
com.baomidou.mybatisplus: debug
|
||||
com.scm.scheduling.infra.mapper: debug
|
||||
|
||||
# 日志配置
|
||||
logback:
|
||||
appName: remi-ids-web
|
||||
fileType: log
|
||||
48
docs/config/nacos/bootstrap.yml
Normal file
48
docs/config/nacos/bootstrap.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
# 服务端口号
|
||||
server:
|
||||
port: 1010
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: remi-sys-web
|
||||
profiles:
|
||||
active: dev
|
||||
cloud:
|
||||
# nacos
|
||||
nacos:
|
||||
# 注册中心
|
||||
username: nacos
|
||||
password: nacos
|
||||
discovery:
|
||||
# 配置中心的地址
|
||||
server-addr: ${NACOS_HOST:192.168.31.88}:${NACOS_PORT:8848}
|
||||
#命名空间
|
||||
namespace: ${SERVICE_NAME_SPACE_NAME:cloud}
|
||||
# 配置文件的环境
|
||||
group: ${SERVICE_DISCOVERY_GROUP_NAME:dev}
|
||||
# 配置中心
|
||||
config:
|
||||
# 配置中心的地址
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
#命名空间
|
||||
namespace: ${spring.cloud.nacos.discovery.namespace}
|
||||
# 配置文件prefix
|
||||
prefix: ${spring.application.name}
|
||||
# 配置文件的环境
|
||||
group: ${spring.cloud.nacos.discovery.group}
|
||||
# 配置文件的格式
|
||||
file-extension: yaml
|
||||
# 配置的编码
|
||||
encode: UTF-8
|
||||
# 是否开启监听和自动刷新
|
||||
refresh-enabled: true
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
# Data Id 的默认完整格式为: ${prefix}-${spring.profile.active}.${file-extension}。
|
||||
- dataId: cloud-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
group: ${spring.cloud.nacos.discovery.group}
|
||||
#是否自动刷新
|
||||
refresh: true
|
||||
|
||||
|
||||
|
||||
83
docs/config/nacos/cloud-dev.yaml
Normal file
83
docs/config/nacos/cloud-dev.yaml
Normal file
@@ -0,0 +1,83 @@
|
||||
# 服务端口号
|
||||
server:
|
||||
# tomcat 配置
|
||||
tomcat:
|
||||
# tomcat的URI编码
|
||||
uri-encoding: UTF-8
|
||||
# tomcat最大线程数,默认为200
|
||||
max-threads: 500
|
||||
# Tomcat启动初始化的线程数,默认值25
|
||||
min-spare-threads: 30
|
||||
|
||||
# mybatis-plus
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
#控制台打印完整带参数SQL语句
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
#mapper映射文件路径
|
||||
mapper-locations: classpath*:/*-infra/src/main/resources/mapper/*.xml, classpath*:/mapper/**.xml
|
||||
|
||||
#pagehelper
|
||||
pagehelper:
|
||||
# helper-dialect: mysql
|
||||
#分页插件会自动检测当前的数据库链接,自动选择合适的分页方式。 你可以配置helperDialect 属性来指定分页插件使用哪种方言。
|
||||
auto-runtime-dialect: true
|
||||
#分页合理化参数,默认值为 false 。当该参数设置为 true 时, pageNum<=0 时会查询第一页, pageNum>pages (超过总数时),会查询最后一页。
|
||||
reasonable: true
|
||||
#支持通过Mapper接口参数传递page参数,默认值为false
|
||||
support-methods-arguments: true
|
||||
#默认值为 false ,当该参数设置为 true 时,如果 pageSize=0 或者 RowBounds.limit =0 就会查询出全部的结果(相当于没有执行分页查询,但是返回结果仍然是 Page 类型)。
|
||||
page-size-zero: true
|
||||
#为了支持 startPage(Object params) 方法,增加了该参数来配置参数映射,用于从对象中根据属性名取值
|
||||
params: count=countSql
|
||||
|
||||
# feign
|
||||
feign:
|
||||
okhttp:
|
||||
enabled: true
|
||||
hystrix:
|
||||
enabled: true
|
||||
sentinel:
|
||||
enabled: true
|
||||
client:
|
||||
config:
|
||||
default:
|
||||
connectTimeout: 100000
|
||||
readTimeout: 100000
|
||||
|
||||
# springdoc-openapi项目配置
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
path: /swagger-ui.html
|
||||
api-docs:
|
||||
path: /v3/api-docs
|
||||
|
||||
# knife4j的增强配置,不需要增强可以不配
|
||||
knife4j:
|
||||
enable: true
|
||||
setting:
|
||||
language: zh-CN
|
||||
|
||||
# 定义日志输出级别
|
||||
logging:
|
||||
level:
|
||||
ai.remi: debug
|
||||
# spring 包日志输出级别
|
||||
org.springframework: info
|
||||
# alibaba 包日志输出级别
|
||||
com.alibaba.cloud: info
|
||||
# nacos 心跳 INFO 屏蔽
|
||||
com.alibaba.nacos: off
|
||||
# undertow
|
||||
io.undertow: info
|
||||
# mybatis-plus
|
||||
com.baomidou.mybatisplus: debug
|
||||
|
||||
spring:
|
||||
# 循环依赖的问题
|
||||
main:
|
||||
allow-circular-references: true
|
||||
# MVC默认的路径匹配策略为PATH_PATTERN_PARSER,需要修改为ANT_PATH_MATCHER 解决swagger兼容性问题
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ANT_PATH_MATCHER
|
||||
122
docs/config/nacos/sdt-iam-web-dev.yaml
Normal file
122
docs/config/nacos/sdt-iam-web-dev.yaml
Normal file
@@ -0,0 +1,122 @@
|
||||
spring:
|
||||
application:
|
||||
name: remi-sys-web
|
||||
config:
|
||||
activate:
|
||||
on-profile: dev
|
||||
servlet:
|
||||
multipart:
|
||||
# 上传文件总的最大值
|
||||
max-request-size: 100MB
|
||||
# 单个文件的最大值
|
||||
max-file-size: 100MB
|
||||
datasource:
|
||||
# mysql
|
||||
url: jdbc:mysql://192.168.31.66:3306/remi-saas-iam?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false&nullCatalogMeansCurrent=true
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: 123456
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
# 下面为连接池的补充设置,应用到上面所有数据源中
|
||||
# 初始化大小,最小,最大
|
||||
initial-size: 5
|
||||
min-idle: 5
|
||||
max-active: 20
|
||||
# 配置获取连接等待超时的时间
|
||||
max-wait: 60000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
time-between-eviction-runs-millis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
min-evictable-idle-time-millis: 300000
|
||||
# mysql
|
||||
validation-query: SELECT 1 FROM DUAL
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
# 打开PSCache,并且指定每个连接上PSCache的大小
|
||||
pool-prepared-statements: true
|
||||
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
filters: stat,wall
|
||||
use-global-data-source-stat: true
|
||||
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||||
connect-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
redis:
|
||||
database: 0
|
||||
host: 192.168.31.66
|
||||
password: ydsz1020
|
||||
port: 6379
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 8
|
||||
max-idle: 8
|
||||
min-idle: 0
|
||||
timeout: 1000
|
||||
|
||||
# 异步线程配置
|
||||
async:
|
||||
executor:
|
||||
thread:
|
||||
# 核心线程数
|
||||
corePoolSize: 10
|
||||
# 最大线程数
|
||||
maxPoolSize: 30
|
||||
# 任务队列大小
|
||||
queueCapacity: 3000
|
||||
# 缓冲队列中线程的空闲时间
|
||||
keepAliveSeconds: 300
|
||||
|
||||
# MinIO
|
||||
minio:
|
||||
#对象存储服务的URL
|
||||
url: http://192.168.31.88:9000
|
||||
#账户
|
||||
accessKey: admin
|
||||
#密码
|
||||
secretKey: Sdt@1020~
|
||||
#存储桶
|
||||
bucketName: remi-paas-iam
|
||||
|
||||
# 拦截器
|
||||
sql-intercept:
|
||||
tenant:
|
||||
deptTenant:
|
||||
enable: true
|
||||
companyTenant:
|
||||
enable: true
|
||||
anonUrlSet: /sso/login/ticket,/sso/login/other,/sso/login/local,/sso/logout,/sso/oauth2/accessToken,/sso/oauth2/refreshToken,/sso/oauth2/checkToken,/logRecord/add,/logRecord/pageLogin,/logRecord/pageOperate,/logRecord/pageException
|
||||
field-fill:
|
||||
createdByIntercept:
|
||||
enable: true
|
||||
updateByIntercept:
|
||||
enable: true
|
||||
createAtIntercept:
|
||||
enable: true
|
||||
updateAtIntercept:
|
||||
enable: true
|
||||
# springdoc-openapi项目配置
|
||||
springdoc:
|
||||
#是否开启文档功能
|
||||
group-configs:
|
||||
- group: 'iam-web'
|
||||
paths-to-match: '/**'
|
||||
packages-to-scan: ai.remi.iam.web
|
||||
|
||||
# 开启系统操作日志
|
||||
log:
|
||||
record:
|
||||
enabled: true
|
||||
appName: IAM
|
||||
pushUrl: http://localhost:6103/operateLog/add
|
||||
|
||||
# 日志输出路径配置
|
||||
logback:
|
||||
logDir: D:\Logs\sdt\cloud\${spring.application.name}\
|
||||
maxSize: 500MB
|
||||
maxDays: 30
|
||||
|
||||
# 应用信息
|
||||
appInfo:
|
||||
code: iam
|
||||
key: kxxyuc46
|
||||
secret: f62b0078aa9b9bcc953b71d614fe999b
|
||||
139
docs/generator/EasyCodeConfig.json
Normal file
139
docs/generator/EasyCodeConfig.json
Normal file
File diff suppressed because one or more lines are too long
36640
docs/pdmaner/sdt-cloud.pdma.json
Normal file
36640
docs/pdmaner/sdt-cloud.pdma.json
Normal file
File diff suppressed because one or more lines are too long
4400
docs/pdmaner/sdt-cms/sdt-cms.pdma.json
Normal file
4400
docs/pdmaner/sdt-cms/sdt-cms.pdma.json
Normal file
File diff suppressed because one or more lines are too long
10287
docs/pdmaner/sdt-crm/sdt-crm.pdma.json
Normal file
10287
docs/pdmaner/sdt-crm/sdt-crm.pdma.json
Normal file
File diff suppressed because one or more lines are too long
17846
docs/pdmaner/sdt-iam/sdt-iam.pdma.json
Normal file
17846
docs/pdmaner/sdt-iam/sdt-iam.pdma.json
Normal file
File diff suppressed because one or more lines are too long
BIN
docs/pdmaner/sdt-iam/统一权限关系图.png
Normal file
BIN
docs/pdmaner/sdt-iam/统一权限关系图.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 498 KiB |
BIN
docs/pdmaner/sdt-iam/统一身份关系图.png
Normal file
BIN
docs/pdmaner/sdt-iam/统一身份关系图.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 438 KiB |
679
pom.xml
Normal file
679
pom.xml
Normal file
@@ -0,0 +1,679 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-cloud</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<url>https://github.com/remi/remi-cloud</url>
|
||||
<name>remi-cloud</name>
|
||||
<description>Remi Cloud</description>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>dianjiu</name>
|
||||
<email>dianjiuxyz@gmail.com</email>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<properties>
|
||||
<!--remi-->
|
||||
<remi.version>3.1.0</remi.version>
|
||||
<!--jdk-->
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<!--UFT-->
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<!--Spring-->
|
||||
<spring-boot.version>2.7.18</spring-boot.version>
|
||||
<spring-cloud.version>2021.0.9</spring-cloud.version>
|
||||
<spring-cloud-alibaba.version>2021.0.6.0</spring-cloud-alibaba.version>
|
||||
<!--1.15-->
|
||||
<commons-codec.version>1.17.0</commons-codec.version>
|
||||
<!--3.2.2-->
|
||||
<commons-collections.version>3.2.2</commons-collections.version>
|
||||
<!--1.10.0-->
|
||||
<commons-text.version>1.10.0</commons-text.version>
|
||||
<!--2.11.0-->
|
||||
<commons-io.version>2.16.1</commons-io.version>
|
||||
<!--3.12.0-->
|
||||
<commons-lang3.version>3.14.0</commons-lang3.version>
|
||||
<!--1.0.4-->
|
||||
<commons-logging.version>1.3.1</commons-logging.version>
|
||||
<!--3.8.0-->
|
||||
<commons-net.version>3.10.0</commons-net.version>
|
||||
<!--1.7-->
|
||||
<commons-validator.version>1.9.0</commons-validator.version>
|
||||
<!--1.4-->
|
||||
<commons-fileupload.version>1.5</commons-fileupload.version>
|
||||
<!--1.0.10-->
|
||||
<device.version>1.0.10</device.version>
|
||||
<!--2.1.3-->
|
||||
<dom4j.version>2.1.3</dom4j.version>
|
||||
<!--1.2.9-->
|
||||
<druid.version>1.2.9</druid.version>
|
||||
<!--3.1.1-->
|
||||
<easyexcel.version>3.1.1</easyexcel.version>
|
||||
<!--6.2.5.Final-->
|
||||
<hibernate-validator.version>6.2.5.Final</hibernate-validator.version>
|
||||
<!--1.21-->
|
||||
<bitwalker.version>1.21</bitwalker.version>
|
||||
<!--2.7.0-->
|
||||
<ip2region.version>2.7.0</ip2region.version>
|
||||
<!--5.8.4-->
|
||||
<hutool.version>5.8.4</hutool.version>
|
||||
<!--31.1-jre-->
|
||||
<guava.version>31.1-jre</guava.version>
|
||||
<!--2.9.0-->
|
||||
<gson.version>2.9.0</gson.version>
|
||||
<!--2.0.6-->
|
||||
<fastjson.version>2.0.6</fastjson.version>
|
||||
<!--2.13.3-->
|
||||
<jackson.version>2.13.3</jackson.version>
|
||||
<!--4.0.0-->
|
||||
<java-jwt.version>0.12.6</java-jwt.version>
|
||||
<!--4.0.1-->
|
||||
<javax.version>4.0.1</javax.version>
|
||||
<!--2.3.1-->
|
||||
<jaxb-api.version>2.3.1</jaxb-api.version>
|
||||
<!--3.3.0-->
|
||||
<cglib.version>3.3.0</cglib.version>
|
||||
<!--4.5.0-->
|
||||
<knife4j.version>4.5.0</knife4j.version>
|
||||
<!--2.6.0-->
|
||||
<springdoc.version>2.6.0</springdoc.version>
|
||||
<!--1.18.34-->
|
||||
<lombok.version>1.18.34</lombok.version>
|
||||
<!--1.5.2.Final-->
|
||||
<mapstruct.version>1.5.2.Final</mapstruct.version>
|
||||
<!--0.2.0-->
|
||||
<lombok-mapstruct.version>0.2.0</lombok-mapstruct.version>
|
||||
<!--3.5.2-->
|
||||
<mybatis-plus.version>3.5.2</mybatis-plus.version>
|
||||
<!--2.2.2-->
|
||||
<mybatis.version>2.2.2</mybatis.version>
|
||||
<!--rdb-sql-->
|
||||
<mysql.version>8.0.33</mysql.version>
|
||||
<ojdbc.version>19.7.0.0</ojdbc.version>
|
||||
<mssql-jdbc.version>7.4.1.jre8</mssql-jdbc.version>
|
||||
<db2-jdbc.version>11.5.0.0</db2-jdbc.version>
|
||||
<postgresql.version>42.6.0</postgresql.version>
|
||||
<h2.db.version>2.2.224</h2.db.version>
|
||||
<mongodb-driver-sync.version>4.10.2</mongodb-driver-sync.version>
|
||||
<!--4.5.13-->
|
||||
<httpclient.version>4.5.13</httpclient.version>
|
||||
<!--8.4.6 4.10.0-->
|
||||
<minio.version>8.5.12</minio.version>
|
||||
<!--4.9.3-->
|
||||
<okhttp3.version>4.12.0</okhttp3.version>
|
||||
<!--velocity-->
|
||||
<velocity.version>1.7</velocity.version>
|
||||
<!--2.4.1-->
|
||||
<xxl-job.version>2.4.1</xxl-job.version>
|
||||
<!--8.13.0-->
|
||||
<trace.version>8.13.0</trace.version>
|
||||
<!--1.7.36-->
|
||||
<slf4j.version>1.7.32</slf4j.version>
|
||||
<!--logback-->
|
||||
<logback.version>1.3.14</logback.version>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
<!--基础服务-->
|
||||
<module>remi-nacos</module>
|
||||
<module>remi-sys</module>
|
||||
<module>remi-demo</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- SpringBoot 依赖配置 -->
|
||||
<dependency>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud 微服务 -->
|
||||
<dependency>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
<version>${spring-cloud.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba 微服务 -->
|
||||
<dependency>
|
||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
<version>${spring-cloud-alibaba.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--内部服务依赖开始-->
|
||||
<!--remi-comm-->
|
||||
<dependency>
|
||||
<artifactId>remi-comm</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>remi-comm-core</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>remi-comm-minio</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>remi-comm-redis</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>remi-comm-jdbc</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>remi-comm-domain</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>remi-comm-exception</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>remi-comm-feign</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>remi-comm-job</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>remi-comm-log</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>remi-comm-swagger</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>remi-comm-thread</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>remi-comm-util</artifactId>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-auth</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-safe</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-web</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<!--remi-sys-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-sys</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-sys-domain</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-sys-infra</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-sys-server</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-sys-job</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-sys-api</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-sys-app</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-sys-web</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<!--内部服务依赖结束-->
|
||||
|
||||
<!--数据库相关依赖开始-->
|
||||
<!-- mybatis-plus -->
|
||||
<dependency>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>mybatis-plus-annotation</artifactId>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>mybatis-plus-extension</artifactId>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<!--mybatis-->
|
||||
<dependency>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<version>${mybatis.version}</version>
|
||||
</dependency>
|
||||
<!-- druid-->
|
||||
<dependency>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
<!-- mysql -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql.version}</version>
|
||||
</dependency>
|
||||
<!-- oracle -->
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<version>${ojdbc.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.nls</groupId>
|
||||
<artifactId>orai18n</artifactId>
|
||||
<version>${ojdbc.version}</version>
|
||||
</dependency>
|
||||
<!-- sqlserver -->
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>${mssql-jdbc.version}</version>
|
||||
</dependency>
|
||||
<!-- db2 -->
|
||||
<dependency>
|
||||
<groupId>com.ibm.db2</groupId>
|
||||
<artifactId>jcc</artifactId>
|
||||
<version>${db2-jdbc.version}</version>
|
||||
</dependency>
|
||||
<!-- postgresql -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>${postgresql.version}</version>
|
||||
</dependency>
|
||||
<!-- h2 database -->
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${h2.db.version}</version>
|
||||
</dependency>
|
||||
<!--数据库相关依赖结束-->
|
||||
|
||||
<!--其他公共依赖开始-->
|
||||
<!-- commons -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
<version>${commons-text.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<groupId>commons-io</groupId>
|
||||
<version>${commons-io.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<version>${commons-lang3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<groupId>commons-codec</groupId>
|
||||
<version>${commons-codec.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
<version>${commons-logging.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>commons-net</artifactId>
|
||||
<groupId>commons-net</groupId>
|
||||
<version>${commons-net.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<groupId>commons-collections</groupId>
|
||||
<version>${commons-collections.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<version>${commons-fileupload.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>commons-validator</artifactId>
|
||||
<groupId>commons-validator</groupId>
|
||||
<version>${commons-validator.version}</version>
|
||||
</dependency>
|
||||
<!-- hibernate-validator -->
|
||||
<dependency>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<version>${hibernate-validator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<version>${hibernate-validator.version}</version>
|
||||
</dependency>
|
||||
<!-- okhttp3 -->
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>${okhttp3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>logging-interceptor</artifactId>
|
||||
<version>${okhttp3.version}</version>
|
||||
</dependency>
|
||||
<!-- httpclient -->
|
||||
<dependency>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<version>${httpclient.version}</version>
|
||||
</dependency>
|
||||
<!--javax-servlet-->
|
||||
<dependency>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<version>${javax.version}</version>
|
||||
</dependency>
|
||||
<!--device-detector-->
|
||||
<dependency>
|
||||
<artifactId>device-detector</artifactId>
|
||||
<groupId>io.github.mngsk</groupId>
|
||||
<version>${device.version}</version>
|
||||
</dependency>
|
||||
<!-- guava -->
|
||||
<dependency>
|
||||
<artifactId>guava</artifactId>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
<!-- apm-toolkit-trace -->
|
||||
<dependency>
|
||||
<artifactId>apm-toolkit-trace</artifactId>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<version>${trace.version}</version>
|
||||
</dependency>
|
||||
<!--fastjson-->
|
||||
<dependency>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
<!--jackson-core -->
|
||||
<dependency>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<!-- gson -->
|
||||
<dependency>
|
||||
<artifactId>gson</artifactId>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<version>${gson.version}</version>
|
||||
</dependency>
|
||||
<!--user-agent-->
|
||||
<dependency>
|
||||
<groupId>eu.bitwalker</groupId>
|
||||
<artifactId>UserAgentUtils</artifactId>
|
||||
<version>${bitwalker.version}</version>
|
||||
</dependency>
|
||||
<!--ip2region-->
|
||||
<dependency>
|
||||
<groupId>org.lionsoul</groupId>
|
||||
<artifactId>ip2region</artifactId>
|
||||
<version>${ip2region.version}</version>
|
||||
</dependency>
|
||||
<!-- hutool-all -->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-core</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-extra</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-http</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-json</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-crypto</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
<!-- dom4j -->
|
||||
<dependency>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<version>${dom4j.version}</version>
|
||||
</dependency>
|
||||
<!--xxl-job-->
|
||||
<dependency>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<version>${xxl-job.version}</version>
|
||||
</dependency>
|
||||
<!--knife4j-->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-gateway-spring-boot-starter</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
</dependency>
|
||||
<!-- easyexcel -->
|
||||
<dependency>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<version>${easyexcel.version}</version>
|
||||
</dependency>
|
||||
<!-- minio -->
|
||||
<dependency>
|
||||
<artifactId>minio</artifactId>
|
||||
<groupId>io.minio</groupId>
|
||||
<version>${minio.version}</version>
|
||||
</dependency>
|
||||
<!--velocity-->
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
<version>${velocity.version}</version>
|
||||
</dependency>
|
||||
<!-- jwt -->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt-api</artifactId>
|
||||
<version>${java-jwt.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt-impl</artifactId>
|
||||
<version>${java-jwt.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt-jackson</artifactId>
|
||||
<version>${java-jwt.version}</version>
|
||||
</dependency>
|
||||
<!-- jaxb-api -->
|
||||
<dependency>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<version>${jaxb-api.version}</version>
|
||||
</dependency>
|
||||
<!--cglib-->
|
||||
<dependency>
|
||||
<artifactId>cglib</artifactId>
|
||||
<groupId>cglib</groupId>
|
||||
<version>${cglib.version}</version>
|
||||
</dependency>
|
||||
<!--lombok-->
|
||||
<dependency>
|
||||
<artifactId>lombok</artifactId>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<version>${lombok.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok-mapstruct-binding</artifactId>
|
||||
<version>${lombok-mapstruct.version}</version>
|
||||
</dependency>
|
||||
<!--mapstruct-->
|
||||
<dependency>
|
||||
<artifactId>mapstruct</artifactId>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</dependency>
|
||||
<!--slf4j-->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-nop</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<!--其他公共依赖结束-->
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<!-- 打包上传到私服, 需要和配置文件中的server节点配合使用 -->
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-releases</id>
|
||||
<name>release</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>maven-snapshots</id>
|
||||
<name>snapshot</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<!--<repositories>-->
|
||||
<!-- <repository>-->
|
||||
<!-- <id>public</id>-->
|
||||
<!-- <name>remi nexus</name>-->
|
||||
<!-- <url>https://repository.njydsz.com/repository/maven-public</url>-->
|
||||
<!-- <releases>-->
|
||||
<!-- <enabled>true</enabled>-->
|
||||
<!-- </releases>-->
|
||||
<!-- <snapshots>-->
|
||||
<!-- <enabled>false</enabled>-->
|
||||
<!-- </snapshots>-->
|
||||
<!-- </repository>-->
|
||||
<!--</repositories>-->
|
||||
|
||||
<!--<pluginRepositories>-->
|
||||
<!-- <pluginRepository>-->
|
||||
<!-- <id>public</id>-->
|
||||
<!-- <name>remi nexus</name>-->
|
||||
<!-- <url>https://repository.njydsz.com/repository/maven-public</url>-->
|
||||
<!-- <releases>-->
|
||||
<!-- <enabled>true</enabled>-->
|
||||
<!-- </releases>-->
|
||||
<!-- <snapshots>-->
|
||||
<!-- <enabled>false</enabled>-->
|
||||
<!-- </snapshots>-->
|
||||
<!-- </pluginRepository>-->
|
||||
<!--</pluginRepositories>-->
|
||||
</project>
|
||||
91
remi-demo/pom.xml
Normal file
91
remi-demo/pom.xml
Normal file
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>remi-demo</artifactId>
|
||||
<name>remi-demo</name>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-cloud</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<!-- 打包上传到私服, 需要和配置文件中的server节点配合使用 -->
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-releases</id>
|
||||
<name>release</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>maven-snapshots</id>
|
||||
<name>snapshot</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<modules>
|
||||
<module>remi-demo-domain</module>
|
||||
<module>remi-demo-infra</module>
|
||||
<module>remi-demo-server</module>
|
||||
<module>remi-demo-job</module>
|
||||
<module>remi-demo-app</module>
|
||||
<module>remi-demo-web</module>
|
||||
<module>remi-demo-api</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!--remi-demo-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-domain</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-infra</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-server</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-job</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-api</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-app</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-web</artifactId>
|
||||
<version>${remi.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
||||
53
remi-demo/remi-demo-api/pom.xml
Normal file
53
remi-demo/remi-demo-api/pom.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>remi-demo-api</artifactId>
|
||||
<name>remi-demo-api</name>
|
||||
<description>remi-demo-api</description>
|
||||
|
||||
<parent>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</parent>
|
||||
|
||||
<!-- 打包上传到私服, 需要和配置文件中的server节点配合使用 -->
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-releases</id>
|
||||
<name>release</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>maven-snapshots</id>
|
||||
<name>snapshot</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<!--remi-comm-feign-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-feign</artifactId>
|
||||
</dependency>
|
||||
<!--remi-demo-domain-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-domain</artifactId>
|
||||
</dependency>
|
||||
<!--servlet-api-->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
</dependency>
|
||||
<!--lombok-->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,14 @@
|
||||
package ai.remi.boot.api.client;
|
||||
|
||||
import ai.remi.boot.api.factory.FeignClientFactory;
|
||||
import ai.remi.comm.feign.aspect.FeignAutoConfiguration;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(value = "remi-demo-web", configuration = FeignAutoConfiguration.class, fallbackFactory = FeignClientFactory.class)
|
||||
public interface FeignClientApi {
|
||||
|
||||
@GetMapping("/books/findByBooksId")
|
||||
String findById(@RequestParam("booksId") int booksId);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package ai.remi.boot.api.factory;
|
||||
|
||||
import ai.remi.boot.api.client.FeignClientApi;
|
||||
import ai.remi.boot.api.fallback.FeignClientFallback;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class FeignClientFactory implements FallbackFactory<FeignClientApi> {
|
||||
|
||||
@Override
|
||||
public FeignClientApi create(Throwable cause) {
|
||||
FeignClientFallback fallback = new FeignClientFallback();
|
||||
fallback.setCause(cause);
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package ai.remi.boot.api.fallback;
|
||||
|
||||
import ai.remi.boot.api.client.FeignClientApi;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class FeignClientFallback implements FeignClientApi {
|
||||
@Setter
|
||||
private Throwable cause;
|
||||
|
||||
@Override
|
||||
public String findById(int goodsId) {
|
||||
log.error("findById = {}", cause.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
121
remi-demo/remi-demo-app/pom.xml
Normal file
121
remi-demo/remi-demo-app/pom.xml
Normal file
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>remi-demo-app</artifactId>
|
||||
<name>remi-demo-app</name>
|
||||
<description>remi-demo-app</description>
|
||||
|
||||
<parent>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</parent>
|
||||
|
||||
<!-- 打包上传到私服, 需要和配置文件中的server节点配合使用 -->
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-releases</id>
|
||||
<name>release</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>maven-snapshots</id>
|
||||
<name>snapshot</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<!--spring-boot-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--spring-cloud-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--Nacos-注册中心-->
|
||||
<!--<dependency>-->
|
||||
<!-- <groupId>com.alibaba.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>-->
|
||||
<!--</dependency>-->
|
||||
|
||||
<!--Nacos-配置中心-->
|
||||
<!--<dependency>-->
|
||||
<!-- <groupId>com.alibaba.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>-->
|
||||
<!--</dependency>-->
|
||||
|
||||
<!--健康监控-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--负载均衡-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--防刷限流-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!--remi-comm-feign-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-feign</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--remi-demo-job-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-job</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--引入内部模块-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-server</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!--<resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <directory>src/main/java</directory>-->
|
||||
<!-- <includes>-->
|
||||
<!-- <include>**/*.xml</include>-->
|
||||
<!-- <include>**/*.properties</include>-->
|
||||
<!-- <include>**/*.yml</include>-->
|
||||
<!-- </includes>-->
|
||||
<!-- </resource>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <directory>src/main/resources</directory>-->
|
||||
<!-- </resource>-->
|
||||
<!--</resources>-->
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,29 @@
|
||||
package ai.remi.boot.app;
|
||||
|
||||
import ai.remi.comm.feign.annotation.EnableRemiFeignClients;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.context.annotation.EnableMBeanExport;
|
||||
import org.springframework.jmx.support.RegistrationPolicy;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
//@Enableremitem
|
||||
//@EnableLogRecord
|
||||
@EnableDiscoveryClient
|
||||
@EnableRemiFeignClients
|
||||
@EnableTransactionManagement
|
||||
@SpringBootApplication(scanBasePackages = "ai.remi")
|
||||
@EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)
|
||||
public class Application {
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
SpringApplication.run(Application.class, args);
|
||||
|
||||
System.out.println("(♥◠‿◠)ノ゙ Remi Cloud App 启动成功 ლ(´ڡ`ლ)゙ ");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
45
remi-demo/remi-demo-app/src/main/resources/bootstrap.yml
Normal file
45
remi-demo/remi-demo-app/src/main/resources/bootstrap.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
# 服务端口号
|
||||
server:
|
||||
port: 8081
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: remi-bpm-web
|
||||
profiles:
|
||||
active: dev
|
||||
cloud:
|
||||
# nacos
|
||||
nacos:
|
||||
# 注册中心
|
||||
username: nacos
|
||||
password: nacos
|
||||
discovery:
|
||||
# 配置中心的地址
|
||||
server-addr: ${NACOS_HOST:192.168.31.18}:${NACOS_PORT:8848}
|
||||
#命名空间
|
||||
namespace: ${SERVICE_NAME_SPACE_NAME:dev}
|
||||
# 配置文件的环境
|
||||
group: ${SERVICE_DISCOVERY_GROUP_NAME:dev}
|
||||
# 配置中心
|
||||
config:
|
||||
# 配置中心的地址
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
#命名空间
|
||||
namespace: ${spring.cloud.nacos.discovery.namespace}
|
||||
# 配置文件prefix
|
||||
prefix: ${spring.application.name}
|
||||
# 配置文件的环境
|
||||
group: ${spring.cloud.nacos.discovery.group}
|
||||
# 配置文件的格式
|
||||
file-extension: yaml
|
||||
# 配置的编码
|
||||
encode: UTF-8
|
||||
# 是否开启监听和自动刷新
|
||||
refresh-enabled: true
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
# Data Id 的默认完整格式为: ${prefix}-${spring.profile.active}.${file-extension}。
|
||||
- dataId: remi-cloud-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
group: ${spring.cloud.nacos.discovery.group}
|
||||
#是否自动刷新
|
||||
refresh: true
|
||||
24
remi-demo/remi-demo-app/src/main/resources/docker/Dockerfile
Normal file
24
remi-demo/remi-demo-app/src/main/resources/docker/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
# Docker image for springboot application
|
||||
# VERSION 0.0.1
|
||||
# Author: DianJiu
|
||||
# 指定基础镜像,这是分阶段构建的前期阶段
|
||||
FROM harbor.njydsz.com/library/jdk:17 as builder
|
||||
# 维护者
|
||||
MAINTAINER DianJiu <dianjiuxyz@gmail.com>
|
||||
#VOLUME:挂载目录
|
||||
VOLUME /temp
|
||||
|
||||
#ADD 将app.jar文件将拷贝到容器中,默认拷贝到根路径下
|
||||
#也可以直接写成ADD app.jar /app.jar 或者 ADD app.jar /
|
||||
ADD remi-demo-app-3.1.0.jar remi-demo-app.jar
|
||||
|
||||
#修改app.jar这个文件的访问时间和修改时间为当前时间,而不会修改文件的内容。
|
||||
RUN bash -c "touch /remi-demo-app.jar"
|
||||
|
||||
#ENTRYPOINT 应用启动命令 参数设定
|
||||
#由于tomcat的session id的生成主要通过java.security.SecureRandom生成随机数来实现,导致启动过程很慢
|
||||
#通过-Djava.security.egd=file:/dev/./urandom参数可以加快随机数产生过程
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/remi-demo-app.jar"]
|
||||
|
||||
#EXPOSE 容器暴露端口
|
||||
EXPOSE 8081
|
||||
@@ -0,0 +1,5 @@
|
||||
```shell
|
||||
sh ./docker_deploy.sh
|
||||
|
||||
docker logs -f remi-demo-app
|
||||
```
|
||||
@@ -0,0 +1,7 @@
|
||||
docker stop remi-demo-app
|
||||
docker rm -f remi-demo-app
|
||||
docker rmi remi-demo-app
|
||||
docker build -t remi-demo-app .
|
||||
docker images
|
||||
docker run --restart=always -t -dit -p 8081:8081 -e TZ="Asia/Shanghai" --name remi-demo-app remi-demo-app
|
||||
docker ps
|
||||
152
remi-demo/remi-demo-app/src/main/resources/logback-spring.xml
Normal file
152
remi-demo/remi-demo-app/src/main/resources/logback-spring.xml
Normal file
@@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为INFO,则低于INFO级别的信息都不会输出 -->
|
||||
<!-- scan:默认值为true,当此属性设置为true时,配置文件如果发生改变,将会被重新加载 -->
|
||||
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
|
||||
<!-- debug:默认值为false。当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。 -->
|
||||
<contextName>logback</contextName>
|
||||
|
||||
<!--application.yml 传递参数,不能使用logback 自带的<property>标签 -->
|
||||
<springProperty scope="context" name="logDir" source="logback.logDir"/>
|
||||
<springProperty scope="context" name="appName" source="spring.application.name"/>
|
||||
|
||||
<!-- 彩色日志格式 -->
|
||||
<property name="CONSOLE_LOG_PATTERN"
|
||||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
||||
<!-- 彩色日志依赖的渲染类 -->
|
||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
|
||||
<conversionRule conversionWord="wex"
|
||||
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
|
||||
<conversionRule conversionWord="wEx"
|
||||
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
|
||||
|
||||
<!--输出到控制台-->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>debug</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- debug日志输出文件 -->
|
||||
<appender name="debug_file" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${logDir}/debug.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 每天对日志归档 -->
|
||||
<fileNamePattern>${logDir}/%d{yyyy-MM-dd}/debug-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
|
||||
<maxHistory>30</maxHistory>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger [%file : %line] - %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>DEBUG</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- info日志输出文件 -->
|
||||
<appender name="info_file" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${logDir}/info.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 每天对日志归档 -->
|
||||
<fileNamePattern>${logDir}/%d{yyyy-MM-dd}/info-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
|
||||
<maxHistory>30</maxHistory>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger [%file : %line] - %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>INFO</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- warn日志输出文件 -->
|
||||
<appender name="warn_file" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${logDir}/warn.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 每天对日志归档 -->
|
||||
<fileNamePattern>${logDir}/%d{yyyy-MM-dd}/warn-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
|
||||
<maxHistory>30</maxHistory>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger [%file : %line] - %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>WARN</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- error日志输出文件 -->
|
||||
<appender name="error_file" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${logDir}/error.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 每天对日志归档 -->
|
||||
<fileNamePattern>${logDir}/%d{yyyy-MM-dd}/error-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
|
||||
<maxHistory>30</maxHistory>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger [%file : %line] - %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!--全量日志-->
|
||||
<appender name="detail_file" class="ch.qos.logback.core.rolling.RollingFileAppender" additivity="false">
|
||||
<File>${logDir}/${appName}.log</File>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger [%file : %line] - %msg%n</pattern>
|
||||
</encoder>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${logDir}/%d{yyyy-MM-dd}/${appName}-%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
|
||||
<!--开发环境:打印控制台-->
|
||||
<springProfile name="dev">
|
||||
<logger name="ai.remi" level="debug"/>
|
||||
</springProfile>
|
||||
<springProfile name="!dev">
|
||||
<logger name="ai.remi" level="info"/>
|
||||
</springProfile>
|
||||
|
||||
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
||||
<root>
|
||||
<level value="info"/>
|
||||
<appender-ref ref="console"/>
|
||||
<appender-ref ref="debug_file"/>
|
||||
<appender-ref ref="info_file"/>
|
||||
<appender-ref ref="warn_file"/>
|
||||
<appender-ref ref="error_file"/>
|
||||
<appender-ref ref="detail_file"/>
|
||||
</root>
|
||||
</configuration>
|
||||
81
remi-demo/remi-demo-domain/pom.xml
Normal file
81
remi-demo/remi-demo-domain/pom.xml
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>remi-demo-domain</artifactId>
|
||||
<name>remi-demo-domain</name>
|
||||
<description>remi-demo-domain</description>
|
||||
|
||||
<parent>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</parent>
|
||||
|
||||
<!-- 打包上传到私服, 需要和配置文件中的server节点配合使用 -->
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-releases</id>
|
||||
<name>release</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>maven-snapshots</id>
|
||||
<name>snapshot</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<!--remi-comm-domain-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-domain</artifactId>
|
||||
</dependency>
|
||||
<!--remi-comm-swagger-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-swagger</artifactId>
|
||||
</dependency>
|
||||
<!-- Lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Maven 编译插件,提供给 MapStruct 使用 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.10.1</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<annotationProcessorPaths>
|
||||
<!-- MapStruct 注解处理器 -->
|
||||
<path>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</path>
|
||||
<!-- Lombok 注解处理器 -->
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
</path>
|
||||
<!-- MapStruct 和 Lombok 注解绑定处理器 -->
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok-mapstruct-binding</artifactId>
|
||||
<version>${lombok-mapstruct.version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,31 @@
|
||||
package ai.remi.boot.domain.constant;
|
||||
|
||||
/**
|
||||
* 单点登录基础常量
|
||||
*/
|
||||
public class SsoConstant {
|
||||
/**
|
||||
* 服务端登录路径
|
||||
*/
|
||||
public static final String LOGIN_PATH = "/sso/login";
|
||||
|
||||
/**
|
||||
* 服务端退出路径
|
||||
*/
|
||||
public static final String LOGOUT_PATH = "/sso/logout";
|
||||
|
||||
/**
|
||||
* 认证路径
|
||||
*/
|
||||
public static final String AUTH_PATH = "/sso/oauth2";
|
||||
|
||||
/**
|
||||
* 服务端回调客户端地址参数名称
|
||||
*/
|
||||
public static final String REDIRECT_URL = "redirectUrl";
|
||||
|
||||
/**
|
||||
* 服务端单点退出回调客户端退出参数名称
|
||||
*/
|
||||
public static final String LOGOUT_PARAMETER_NAME = "logoutRequest";
|
||||
}
|
||||
41
remi-demo/remi-demo-infra/pom.xml
Normal file
41
remi-demo/remi-demo-infra/pom.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>remi-demo-infra</artifactId>
|
||||
<name>remi-demo-infra</name>
|
||||
<description>remi-demo-infra</description>
|
||||
|
||||
<parent>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</parent>
|
||||
|
||||
<!-- 打包上传到私服, 需要和配置文件中的server节点配合使用 -->
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-releases</id>
|
||||
<name>release</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>maven-snapshots</id>
|
||||
<name>snapshot</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<!--remi-comm-jdbc-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-jdbc</artifactId>
|
||||
</dependency>
|
||||
<!--remi-demo-domain-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-domain</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
23
remi-demo/remi-demo-job/README.md
Normal file
23
remi-demo/remi-demo-job/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
```yaml
|
||||
# XXL-JOB
|
||||
xxl-job:
|
||||
enabled: false
|
||||
# 调度中心部署跟地址
|
||||
adminAddresses: http://127.0.0.1:8080/xxl-job-admin
|
||||
# 执行器通讯TOKEN
|
||||
accessToken:
|
||||
# 执行器
|
||||
executor:
|
||||
# 执行器AppName
|
||||
appname: remi-demo-job
|
||||
# 执行器注册地址
|
||||
address:
|
||||
# 执行器IP
|
||||
ip:
|
||||
# 执行器端口号
|
||||
port:
|
||||
# 执行器运行日志文件存储磁盘路径
|
||||
logPath: /app/logs/remi-demo-job
|
||||
# 执行器日志文件保存天数
|
||||
logRetentionDays: 30
|
||||
```
|
||||
42
remi-demo/remi-demo-job/pom.xml
Normal file
42
remi-demo/remi-demo-job/pom.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>remi-demo-job</artifactId>
|
||||
<name>remi-demo-job</name>
|
||||
<description>remi-demo-job</description>
|
||||
|
||||
<parent>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</parent>
|
||||
|
||||
<!-- 打包上传到私服, 需要和配置文件中的server节点配合使用 -->
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-releases</id>
|
||||
<name>release</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>maven-snapshots</id>
|
||||
<name>snapshot</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<!--remi-comm-job-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-job</artifactId>
|
||||
</dependency>
|
||||
<!--remi-demo-server-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-server</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,257 @@
|
||||
package ai.remi.boot.job.handler;
|
||||
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* XxlJob开发示例(Bean模式)
|
||||
* <p>
|
||||
* 开发步骤:
|
||||
* 1、任务开发:在Spring Bean实例中,开发Job方法;
|
||||
* 2、注解配置:为Job方法添加注解 "@XxlJob(value="自定义jobhandler名称", init = "JobHandler初始化方法", destroy = "JobHandler销毁方法")",注解value值对应的是调度中心新建任务的JobHandler属性的值。
|
||||
* 3、执行日志:需要通过 "XxlJobHelper.log" 打印执行日志;
|
||||
* 4、任务结果:默认任务结果为 "成功" 状态,不需要主动设置;如有诉求,比如设置任务结果为失败,可以通过 "XxlJobHelper.handleFail/handleSuccess" 自主设置任务结果;
|
||||
*
|
||||
* @author dianjiu
|
||||
* @date 2021/12/27 17:38
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class DemoJobHandler {
|
||||
|
||||
//@Resource
|
||||
//private UsersServiceImpl usersService;
|
||||
|
||||
/**
|
||||
* 1、简单任务示例(Bean模式)
|
||||
*/
|
||||
@XxlJob("demoJobHandler")
|
||||
public ReturnT<String> demoJobHandler(String param) {
|
||||
XxlJobHelper.log("XXL-JOB demoJob start.");
|
||||
// todo
|
||||
// usersService.get();
|
||||
XxlJobHelper.log("XXL-JOB demoJob start.");
|
||||
log.info("test end.");
|
||||
return ReturnT.SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 2、分片广播任务
|
||||
*/
|
||||
@XxlJob("shardingJobHandler")
|
||||
public void shardingJobHandler() throws Exception {
|
||||
|
||||
// 分片参数
|
||||
int shardIndex = XxlJobHelper.getShardIndex();
|
||||
int shardTotal = XxlJobHelper.getShardTotal();
|
||||
|
||||
XxlJobHelper.log("分片参数:当前分片序号 = {}, 总分片数 = {}", shardIndex, shardTotal);
|
||||
|
||||
// 业务逻辑
|
||||
for (int i = 0; i < shardTotal; i++) {
|
||||
if (i == shardIndex) {
|
||||
XxlJobHelper.log("第 {} 片, 命中分片开始处理", i);
|
||||
} else {
|
||||
XxlJobHelper.log("第 {} 片, 忽略", i);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 3、命令行任务
|
||||
*/
|
||||
@XxlJob("commandJobHandler")
|
||||
public void commandJobHandler() throws Exception {
|
||||
String command = XxlJobHelper.getJobParam();
|
||||
int exitValue = -1;
|
||||
|
||||
BufferedReader bufferedReader = null;
|
||||
try {
|
||||
// command process
|
||||
ProcessBuilder processBuilder = new ProcessBuilder();
|
||||
processBuilder.command(command);
|
||||
processBuilder.redirectErrorStream(true);
|
||||
|
||||
Process process = processBuilder.start();
|
||||
//Process process = Runtime.getRuntime().exec(command);
|
||||
|
||||
BufferedInputStream bufferedInputStream = new BufferedInputStream(process.getInputStream());
|
||||
bufferedReader = new BufferedReader(new InputStreamReader(bufferedInputStream));
|
||||
|
||||
// command log
|
||||
String line;
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
XxlJobHelper.log(line);
|
||||
}
|
||||
|
||||
// command exit
|
||||
process.waitFor();
|
||||
exitValue = process.exitValue();
|
||||
} catch (Exception e) {
|
||||
XxlJobHelper.log(e);
|
||||
} finally {
|
||||
if (bufferedReader != null) {
|
||||
bufferedReader.close();
|
||||
}
|
||||
}
|
||||
|
||||
if (exitValue == 0) {
|
||||
// default success
|
||||
} else {
|
||||
XxlJobHelper.handleFail("command exit value(" + exitValue + ") is failed");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 4、跨平台Http任务
|
||||
* 参数示例:
|
||||
* "url: http://www.baidu.com\n" +
|
||||
* "method: get\n" +
|
||||
* "data: content\n";
|
||||
*/
|
||||
@XxlJob("httpJobHandler")
|
||||
public void httpJobHandler() throws Exception {
|
||||
|
||||
// param parse
|
||||
String param = XxlJobHelper.getJobParam();
|
||||
if (param == null || param.trim().length() == 0) {
|
||||
XxlJobHelper.log("param[" + param + "] invalid.");
|
||||
|
||||
XxlJobHelper.handleFail();
|
||||
return;
|
||||
}
|
||||
|
||||
String[] httpParams = param.split("\n");
|
||||
String url = null;
|
||||
String method = null;
|
||||
String data = null;
|
||||
for (String httpParam : httpParams) {
|
||||
if (httpParam.startsWith("url:")) {
|
||||
url = httpParam.substring(httpParam.indexOf("url:") + 4).trim();
|
||||
}
|
||||
if (httpParam.startsWith("method:")) {
|
||||
method = httpParam.substring(httpParam.indexOf("method:") + 7).trim().toUpperCase();
|
||||
}
|
||||
if (httpParam.startsWith("data:")) {
|
||||
data = httpParam.substring(httpParam.indexOf("data:") + 5).trim();
|
||||
}
|
||||
}
|
||||
|
||||
// param valid
|
||||
if (url == null || url.trim().length() == 0) {
|
||||
XxlJobHelper.log("url[" + url + "] invalid.");
|
||||
|
||||
XxlJobHelper.handleFail();
|
||||
return;
|
||||
}
|
||||
if (method == null || !Arrays.asList("GET", "POST").contains(method)) {
|
||||
XxlJobHelper.log("method[" + method + "] invalid.");
|
||||
|
||||
XxlJobHelper.handleFail();
|
||||
return;
|
||||
}
|
||||
boolean isPostMethod = method.equals("POST");
|
||||
|
||||
// request
|
||||
HttpURLConnection connection = null;
|
||||
BufferedReader bufferedReader = null;
|
||||
try {
|
||||
// connection
|
||||
URL realUrl = new URL(url);
|
||||
connection = (HttpURLConnection) realUrl.openConnection();
|
||||
|
||||
// connection setting
|
||||
connection.setRequestMethod(method);
|
||||
connection.setDoOutput(isPostMethod);
|
||||
connection.setDoInput(true);
|
||||
connection.setUseCaches(false);
|
||||
connection.setReadTimeout(5 * 1000);
|
||||
connection.setConnectTimeout(3 * 1000);
|
||||
connection.setRequestProperty("connection", "Keep-Alive");
|
||||
connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
|
||||
connection.setRequestProperty("Accept-Charset", "application/json;charset=UTF-8");
|
||||
|
||||
// do connection
|
||||
connection.connect();
|
||||
|
||||
// data
|
||||
if (isPostMethod && data != null && data.trim().length() > 0) {
|
||||
DataOutputStream dataOutputStream = new DataOutputStream(connection.getOutputStream());
|
||||
dataOutputStream.write(data.getBytes("UTF-8"));
|
||||
dataOutputStream.flush();
|
||||
dataOutputStream.close();
|
||||
}
|
||||
|
||||
// valid StatusCode
|
||||
int statusCode = connection.getResponseCode();
|
||||
if (statusCode != 200) {
|
||||
throw new RuntimeException("Http Request StatusCode(" + statusCode + ") Invalid.");
|
||||
}
|
||||
|
||||
// result
|
||||
bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
|
||||
StringBuilder result = new StringBuilder();
|
||||
String line;
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
result.append(line);
|
||||
}
|
||||
String responseMsg = result.toString();
|
||||
|
||||
XxlJobHelper.log(responseMsg);
|
||||
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
XxlJobHelper.log(e);
|
||||
|
||||
XxlJobHelper.handleFail();
|
||||
return;
|
||||
} finally {
|
||||
try {
|
||||
if (bufferedReader != null) {
|
||||
bufferedReader.close();
|
||||
}
|
||||
if (connection != null) {
|
||||
connection.disconnect();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
XxlJobHelper.log(e2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 5、生命周期任务示例:任务初始化与销毁时,支持自定义相关逻辑;
|
||||
*/
|
||||
@XxlJob(value = "demoJobHandler2", init = "init", destroy = "destroy")
|
||||
public void demoJobHandler2() throws Exception {
|
||||
XxlJobHelper.log("XXL-JOB, Hello World.");
|
||||
}
|
||||
|
||||
public void init() {
|
||||
log.info("init");
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
log.info("destroy");
|
||||
}
|
||||
|
||||
}
|
||||
59
remi-demo/remi-demo-server/pom.xml
Normal file
59
remi-demo/remi-demo-server/pom.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>remi-demo-server</artifactId>
|
||||
<name>remi-demo-server</name>
|
||||
<description>remi-demo-server</description>
|
||||
|
||||
<parent>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</parent>
|
||||
|
||||
<!-- 打包上传到私服, 需要和配置文件中的server节点配合使用 -->
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-releases</id>
|
||||
<name>release</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>maven-snapshots</id>
|
||||
<name>snapshot</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<!--remi-demo-infra-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-infra</artifactId>
|
||||
</dependency>
|
||||
<!--启迪公共模块-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-exception</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-minio</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-thread</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-util</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,28 @@
|
||||
package ai.remi.boot.server.exception;
|
||||
|
||||
import ai.remi.comm.exception.enums.ExceptionCode;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum BpmExceptionCode implements ExceptionCode {
|
||||
|
||||
/**
|
||||
* 业务异常code
|
||||
*/
|
||||
INVENTORY_CHECK_FAIL("B2006", "库存不足"),
|
||||
QUERY_ORDER_FAIL("B2007", "查询订单失败"),
|
||||
ORDER_STATUS_EXCEPTION("B2008", "订单状态不合法"),
|
||||
ORDER_PRODUCT_EXCEPTION("B2010", "查询商品失败"),
|
||||
ORDER_SHIPPING_RATE_PLAN_EXCEPTION("B2011", "邮费方案不存在"),
|
||||
ORDER_VARIANTS_EXCEPTION("B2012", "库存扣减异常"),
|
||||
PROMOTION_CODE_EXCEPTION("B2013", "优惠码错误"),
|
||||
CUSTOMER_DISABLE("B2014", "用户被禁用"),
|
||||
;
|
||||
|
||||
|
||||
private String code;
|
||||
|
||||
private String key;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package ai.remi.boot.server.exception;
|
||||
|
||||
import ai.remi.comm.exception.custom.BusinessException;
|
||||
|
||||
public class BpmServiceException extends BusinessException {
|
||||
|
||||
public BpmServiceException(String code, String message) {
|
||||
super(code, message);
|
||||
}
|
||||
|
||||
public BpmServiceException(String code, Throwable cause) {
|
||||
super(code, cause);
|
||||
}
|
||||
|
||||
public BpmServiceException(String code, String message, Throwable cause) {
|
||||
super(code, message, cause);
|
||||
}
|
||||
|
||||
public BpmServiceException(String code, String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
|
||||
super(code, message, cause, enableSuppression, writableStackTrace);
|
||||
}
|
||||
}
|
||||
133
remi-demo/remi-demo-web/pom.xml
Normal file
133
remi-demo/remi-demo-web/pom.xml
Normal file
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>remi-demo-web</artifactId>
|
||||
<name>remi-demo-web</name>
|
||||
<description>remi-demo-web</description>
|
||||
|
||||
<parent>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</parent>
|
||||
|
||||
<!-- 打包上传到私服, 需要和配置文件中的server节点配合使用 -->
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>maven-releases</id>
|
||||
<name>release</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>maven-snapshots</id>
|
||||
<name>snapshot</name>
|
||||
<url>https://repository.njydsz.com/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<!--spring-boot-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--spring-cloud-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--Nacos-注册中心-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--Nacos-配置中心-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--健康监控-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--负载均衡-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--防刷限流-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--remi-comm-web-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--remi-comm-log-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.comm</groupId>
|
||||
<artifactId>remi-comm-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--remi-ids-server-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-server</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--remi-ids-job-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-job</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--remi-ids-api-->
|
||||
<dependency>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-demo-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!--<resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <directory>src/main/java</directory>-->
|
||||
<!-- <includes>-->
|
||||
<!-- <include>**/*.xml</include>-->
|
||||
<!-- <include>**/*.properties</include>-->
|
||||
<!-- <include>**/*.yml</include>-->
|
||||
<!-- </includes>-->
|
||||
<!-- </resource>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <directory>src/main/resources</directory>-->
|
||||
<!-- </resource>-->
|
||||
<!--</resources>-->
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,28 @@
|
||||
package ai.remi.boot.web;
|
||||
|
||||
import ai.remi.comm.feign.annotation.EnableRemiFeignClients;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.context.annotation.EnableMBeanExport;
|
||||
import org.springframework.jmx.support.RegistrationPolicy;
|
||||
|
||||
/**
|
||||
* 系统服务启动程序
|
||||
*/
|
||||
//@EnableLogRecord
|
||||
@EnableDiscoveryClient
|
||||
@EnableRemiFeignClients
|
||||
@SpringBootApplication(scanBasePackages = "ai.remi")
|
||||
@EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
SpringApplication.run(Application.class, args);
|
||||
|
||||
System.out.println("(♥◠‿◠)ノ゙ Sdt Boot Web Startup Completed! ლ(´ڡ`ლ)゙ ");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
45
remi-demo/remi-demo-web/src/main/resources/bootstrap.yml
Normal file
45
remi-demo/remi-demo-web/src/main/resources/bootstrap.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
# 服务端口号
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: remi-demo-web
|
||||
profiles:
|
||||
active: dev
|
||||
cloud:
|
||||
# nacos
|
||||
nacos:
|
||||
# 注册中心
|
||||
username: nacos
|
||||
password: nacos
|
||||
discovery:
|
||||
# 配置中心的地址
|
||||
server-addr: ${NACOS_HOST:192.168.31.18}:${NACOS_PORT:8848}
|
||||
#命名空间
|
||||
namespace: ${SERVICE_NAME_SPACE_NAME:dev}
|
||||
# 配置文件的环境
|
||||
group: ${SERVICE_DISCOVERY_GROUP_NAME:dev}
|
||||
# 配置中心
|
||||
config:
|
||||
# 配置中心的地址
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
#命名空间
|
||||
namespace: ${spring.cloud.nacos.discovery.namespace}
|
||||
# 配置文件prefix
|
||||
prefix: ${spring.application.name}
|
||||
# 配置文件的环境
|
||||
group: ${spring.cloud.nacos.discovery.group}
|
||||
# 配置文件的格式
|
||||
file-extension: yaml
|
||||
# 配置的编码
|
||||
encode: UTF-8
|
||||
# 是否开启监听和自动刷新
|
||||
refresh-enabled: true
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
# Data Id 的默认完整格式为: ${prefix}-${spring.profile.active}.${file-extension}。
|
||||
- dataId: remi-cloud-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
group: ${spring.cloud.nacos.discovery.group}
|
||||
#是否自动刷新
|
||||
refresh: true
|
||||
24
remi-demo/remi-demo-web/src/main/resources/docker/Dockerfile
Normal file
24
remi-demo/remi-demo-web/src/main/resources/docker/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
# Docker image for springboot application
|
||||
# VERSION 0.0.1
|
||||
# Author: DianJiu
|
||||
# 指定基础镜像,这是分阶段构建的前期阶段
|
||||
FROM harbor.njydsz.com/library/jdk:17 as builder
|
||||
# 维护者
|
||||
MAINTAINER DianJiu <dianjiuxyz@gmail.com>
|
||||
#VOLUME:挂载目录
|
||||
VOLUME /temp
|
||||
|
||||
#ADD 将app.jar文件将拷贝到容器中,默认拷贝到根路径下
|
||||
#也可以直接写成ADD app.jar /app.jar 或者 ADD app.jar /
|
||||
ADD remi-demo-web-3.1.0.jar remi-demo-web.jar
|
||||
|
||||
#修改app.jar这个文件的访问时间和修改时间为当前时间,而不会修改文件的内容。
|
||||
RUN bash -c "touch /remi-demo-web.jar"
|
||||
|
||||
#ENTRYPOINT 应用启动命令 参数设定
|
||||
#由于tomcat的session id的生成主要通过java.security.SecureRandom生成随机数来实现,导致启动过程很慢
|
||||
#通过-Djava.security.egd=file:/dev/./urandom参数可以加快随机数产生过程
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/remi-demo-web.jar"]
|
||||
|
||||
#EXPOSE 容器暴露端口
|
||||
EXPOSE 8080
|
||||
@@ -0,0 +1,5 @@
|
||||
```shell
|
||||
sh ./docker_deploy.sh
|
||||
|
||||
docker logs -f remi-demo-web
|
||||
```
|
||||
@@ -0,0 +1,7 @@
|
||||
docker stop remi-demo-web
|
||||
docker rm -f remi-demo-web
|
||||
docker rmi remi-demo-web
|
||||
docker build -t remi-demo-web .
|
||||
docker images
|
||||
docker run --restart=always -t -dit -p 8080:8080 -e TZ="Asia/Shanghai" --name remi-demo-web remi-demo-web
|
||||
docker ps
|
||||
@@ -0,0 +1,17 @@
|
||||
#****************************????****************************
|
||||
business.error=Operate failed
|
||||
illegal.argument=Illegal argument
|
||||
not.logged.in=not logged in or token is invalid
|
||||
#****************************????****************************
|
||||
system.error=System error
|
||||
assert.error=Verify error
|
||||
#****************************????****************************
|
||||
other.system.error=Other system error
|
||||
call.feign.error=Call feign error
|
||||
call.sql.error=Call sql error
|
||||
call.redis.error=Call redis error
|
||||
call.minio.error=Call minio error
|
||||
call.nacos.error=call nacos error
|
||||
call.job.error=Call job error
|
||||
call.mq.error=Call mq error
|
||||
call.es.error=Call es error
|
||||
@@ -0,0 +1,18 @@
|
||||
#****************************操作异常****************************
|
||||
business.error=操作失败
|
||||
illegal.argument=非法参数
|
||||
not.logged.in=未登录或Token失效
|
||||
|
||||
#****************************系统异常****************************
|
||||
system.error=系统异常
|
||||
assert.error=校验失败
|
||||
#****************************三方异常****************************
|
||||
other.system.error=三方系统异常
|
||||
call.feign.error=调用Feign异常
|
||||
call.sql.error=调用数据库异常
|
||||
call.redis.error=调用Redis异常
|
||||
call.minio.error=调用MinIO异常
|
||||
call.nacos.error=调用Nacos异常
|
||||
call.job.error=调用Job异常
|
||||
call.mq.error=调用MQ异常
|
||||
call.es.error=调用ES异常
|
||||
152
remi-demo/remi-demo-web/src/main/resources/logback-spring.xml
Normal file
152
remi-demo/remi-demo-web/src/main/resources/logback-spring.xml
Normal file
@@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为INFO,则低于INFO级别的信息都不会输出 -->
|
||||
<!-- scan:默认值为true,当此属性设置为true时,配置文件如果发生改变,将会被重新加载 -->
|
||||
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
|
||||
<!-- debug:默认值为false。当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。 -->
|
||||
<contextName>logback</contextName>
|
||||
|
||||
<!--application.yml 传递参数,不能使用logback 自带的<property>标签 -->
|
||||
<springProperty scope="context" name="logDir" source="logback.logDir"/>
|
||||
<springProperty scope="context" name="appName" source="spring.application.name"/>
|
||||
|
||||
<!-- 彩色日志格式 -->
|
||||
<property name="CONSOLE_LOG_PATTERN"
|
||||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
||||
<!-- 彩色日志依赖的渲染类 -->
|
||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
|
||||
<conversionRule conversionWord="wex"
|
||||
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
|
||||
<conversionRule conversionWord="wEx"
|
||||
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
|
||||
|
||||
<!--输出到控制台-->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>debug</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- debug日志输出文件 -->
|
||||
<appender name="debug_file" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${logDir}/debug.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 每天对日志归档 -->
|
||||
<fileNamePattern>${logDir}/%d{yyyy-MM-dd}/debug-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
|
||||
<maxHistory>30</maxHistory>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger [%file : %line] - %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>DEBUG</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- info日志输出文件 -->
|
||||
<appender name="info_file" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${logDir}/info.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 每天对日志归档 -->
|
||||
<fileNamePattern>${logDir}/%d{yyyy-MM-dd}/info-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
|
||||
<maxHistory>30</maxHistory>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger [%file : %line] - %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>INFO</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- warn日志输出文件 -->
|
||||
<appender name="warn_file" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${logDir}/warn.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 每天对日志归档 -->
|
||||
<fileNamePattern>${logDir}/%d{yyyy-MM-dd}/warn-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
|
||||
<maxHistory>30</maxHistory>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger [%file : %line] - %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>WARN</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- error日志输出文件 -->
|
||||
<appender name="error_file" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${logDir}/error.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 每天对日志归档 -->
|
||||
<fileNamePattern>${logDir}/%d{yyyy-MM-dd}/error-%d{yyyy-MM-dd}-%i.log</fileNamePattern>
|
||||
<maxHistory>30</maxHistory>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger [%file : %line] - %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!--全量日志-->
|
||||
<appender name="detail_file" class="ch.qos.logback.core.rolling.RollingFileAppender" additivity="false">
|
||||
<File>${logDir}/${appName}.log</File>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger [%file : %line] - %msg%n</pattern>
|
||||
</encoder>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${logDir}/%d{yyyy-MM-dd}/${appName}-%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
|
||||
<!--开发环境:打印控制台-->
|
||||
<springProfile name="dev">
|
||||
<logger name="ai.remi" level="debug"/>
|
||||
</springProfile>
|
||||
<springProfile name="!dev">
|
||||
<logger name="ai.remi" level="info"/>
|
||||
</springProfile>
|
||||
|
||||
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
||||
<root>
|
||||
<level value="info"/>
|
||||
<appender-ref ref="console"/>
|
||||
<appender-ref ref="debug_file"/>
|
||||
<appender-ref ref="info_file"/>
|
||||
<appender-ref ref="warn_file"/>
|
||||
<appender-ref ref="error_file"/>
|
||||
<appender-ref ref="detail_file"/>
|
||||
</root>
|
||||
</configuration>
|
||||
119
remi-nacos/pom.xml
Normal file
119
remi-nacos/pom.xml
Normal file
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>remi-nacos</artifactId>
|
||||
<name>remi-nacos</name>
|
||||
<packaging>jar</packaging>
|
||||
<description>瑞米平台的注册中心和配置中心</description>
|
||||
|
||||
<parent>
|
||||
<groupId>ai.remi.cloud</groupId>
|
||||
<artifactId>remi-cloud</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<nacos.version>2.3.2-OEM</nacos.version>
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>group.springframework.nacos</groupId>
|
||||
<artifactId>nacos-config</artifactId>
|
||||
<version>${nacos.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>group.springframework.nacos</groupId>
|
||||
<artifactId>nacos-naming</artifactId>
|
||||
<version>${nacos.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>group.springframework.nacos</groupId>
|
||||
<artifactId>nacos-istio</artifactId>
|
||||
<version>${nacos.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>group.springframework.nacos</groupId>
|
||||
<artifactId>nacos-default-plugin-all</artifactId>
|
||||
<version>${nacos.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>group.springframework.nacos</groupId>
|
||||
<artifactId>nacos-prometheus</artifactId>
|
||||
<version>${nacos.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--lombok-->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!--依赖版本声明-->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- SpringBoot 依赖配置 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<excludes>
|
||||
<exclude>**/*.woff</exclude>
|
||||
<exclude>**/*.woff2</exclude>
|
||||
<exclude>**/*.ttf</exclude>
|
||||
<exclude>**/*.eot</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>**/*.woff</include>
|
||||
<include>**/*.woff2</include>
|
||||
<include>**/*.ttf</include>
|
||||
<include>**/*.eot</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
||||
45
remi-nacos/src/main/java/com/alibaba/nacos/Application.java
Normal file
45
remi-nacos/src/main/java/com/alibaba/nacos/Application.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package com.alibaba.nacos;
|
||||
|
||||
import com.alibaba.nacos.config.ConfigConstants;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* @author nacos
|
||||
* <p>
|
||||
* nacos console 源码运行,方便开发 生产从官网下载zip最新版集群配置运行
|
||||
*/
|
||||
@Slf4j
|
||||
@EnableScheduling
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
if (initEnv()) {
|
||||
|
||||
SpringApplication.run(Application.class, args);
|
||||
|
||||
System.out.println("(♥◠‿◠)ノ゙ Remi Nacos Startup Completed! ლ(´ڡ`ლ)゙ ");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化运行环境
|
||||
*/
|
||||
private static boolean initEnv() {
|
||||
// Nacos 是以独立模式运行的
|
||||
System.setProperty(ConfigConstants.STANDALONE_MODE, "true");
|
||||
// 启用了 Nacos 的身份验证功能
|
||||
System.setProperty(ConfigConstants.AUTH_ENABLED, "true");
|
||||
// 设置日志文件存储的基本目录为 logs
|
||||
System.setProperty(ConfigConstants.LOG_BASEDIR, "logs");
|
||||
// Nacos 不会记录日志信息
|
||||
System.setProperty(ConfigConstants.LOG_ENABLED, "false");
|
||||
// 设置 Nacos 控制台的上下文路径为 /nacos
|
||||
System.setProperty(ConfigConstants.NACOS_CONTEXT_PATH, "/nacos");
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.alibaba.nacos.config;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2019-10-31
|
||||
* <p>
|
||||
* 覆盖nacos 默认配置
|
||||
*/
|
||||
public interface ConfigConstants {
|
||||
|
||||
/**
|
||||
* The System property name of Standalone mode
|
||||
*/
|
||||
String STANDALONE_MODE = "nacos.standalone";
|
||||
|
||||
/**
|
||||
* 是否开启认证
|
||||
*/
|
||||
String AUTH_ENABLED = "nacos.core.auth.enabled";
|
||||
|
||||
/**
|
||||
* 日志目录
|
||||
*/
|
||||
String LOG_BASEDIR = "server.tomcat.basedir";
|
||||
|
||||
/**
|
||||
* access_log日志开关
|
||||
*/
|
||||
String LOG_ENABLED = "server.tomcat.accesslog.enabled";
|
||||
|
||||
/**
|
||||
* 路径 nacos context path
|
||||
*/
|
||||
String NACOS_CONTEXT_PATH = "server.servlet.contextPath";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.alibaba.nacos.config;
|
||||
|
||||
import com.alibaba.nacos.core.code.ControllerMethodsCache;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
import org.springframework.web.filter.CorsFilter;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.time.ZoneId;
|
||||
|
||||
/**
|
||||
* Console config.
|
||||
*
|
||||
* @author yshen
|
||||
* @author nkorange
|
||||
* @since 1.2.0
|
||||
*/
|
||||
@Component
|
||||
@EnableScheduling
|
||||
@PropertySource("/application.yml")
|
||||
public class ConsoleConfig {
|
||||
|
||||
@Autowired
|
||||
private ControllerMethodsCache methodsCache;
|
||||
|
||||
@Value("${nacos.console.ui.enabled:true}")
|
||||
private boolean consoleUiEnabled;
|
||||
|
||||
public boolean isConsoleUiEnabled() {
|
||||
return consoleUiEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Init.
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
methodsCache.initClassMethod("com.alibaba.nacos.core.controller");
|
||||
methodsCache.initClassMethod("com.alibaba.nacos.naming.controllers");
|
||||
methodsCache.initClassMethod("com.alibaba.nacos.config.server.controller");
|
||||
methodsCache.initClassMethod("com.alibaba.nacos.controller");
|
||||
}
|
||||
|
||||
@Bean
|
||||
public CorsFilter corsFilter() {
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
config.setAllowCredentials(true);
|
||||
config.addAllowedOriginPattern("*");
|
||||
config.addAllowedHeader("*");
|
||||
config.setMaxAge(18000L);
|
||||
config.addAllowedMethod("*");
|
||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
source.registerCorsConfiguration("/**", config);
|
||||
return new CorsFilter(source);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization() {
|
||||
return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(ZoneId.systemDefault().toString());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.alibaba.nacos.console.config;
|
||||
|
||||
import com.alibaba.nacos.config.ConsoleConfig;
|
||||
import com.alibaba.nacos.sys.module.ModuleState;
|
||||
import com.alibaba.nacos.sys.module.ModuleStateBuilder;
|
||||
import com.alibaba.nacos.sys.utils.ApplicationUtils;
|
||||
|
||||
/**
|
||||
* Console module state builder.
|
||||
*
|
||||
* @author xiweng.yy
|
||||
*/
|
||||
public class ConsoleModuleStateBuilder implements ModuleStateBuilder {
|
||||
|
||||
public static final String CONSOLE_MODULE = "console";
|
||||
|
||||
private static final String CONSOLE_UI_ENABLED = "console_ui_enabled";
|
||||
|
||||
@Override
|
||||
public ModuleState build() {
|
||||
ModuleState result = new ModuleState(CONSOLE_MODULE);
|
||||
try {
|
||||
ConsoleConfig consoleConfig = ApplicationUtils.getBean(ConsoleConfig.class);
|
||||
result.newState(CONSOLE_UI_ENABLED, consoleConfig.isConsoleUiEnabled());
|
||||
}
|
||||
catch (Exception ignored) {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.alibaba.nacos.console.controller;
|
||||
|
||||
import com.alibaba.nacos.console.paramcheck.ConsoleDefaultHttpParamExtractor;
|
||||
import com.alibaba.nacos.core.cluster.health.ModuleHealthCheckerHolder;
|
||||
import com.alibaba.nacos.core.cluster.health.ReadinessResult;
|
||||
import com.alibaba.nacos.core.paramcheck.ExtractorManager;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* Health Controller.
|
||||
*
|
||||
* @author <a href="mailto:huangxiaoyu1018@gmail.com">hxy1991</a>
|
||||
*/
|
||||
@RestController("consoleHealth")
|
||||
@RequestMapping("/v1/console/health")
|
||||
@ExtractorManager.Extractor(httpExtractor = ConsoleDefaultHttpParamExtractor.class)
|
||||
public class HealthController {
|
||||
|
||||
/**
|
||||
* Whether the Nacos is in broken states or not, and cannot recover except by being
|
||||
* restarted.
|
||||
* @return HTTP code equal to 200 indicates that Nacos is in right states. HTTP code
|
||||
* equal to 500 indicates that Nacos is in broken states.
|
||||
*/
|
||||
@GetMapping("/liveness")
|
||||
public ResponseEntity<String> liveness() {
|
||||
return ResponseEntity.ok().body("OK");
|
||||
}
|
||||
|
||||
/**
|
||||
* Ready to receive the request or not.
|
||||
* @return HTTP code equal to 200 indicates that Nacos is ready. HTTP code equal to
|
||||
* 500 indicates that Nacos is not ready.
|
||||
*/
|
||||
@GetMapping("/readiness")
|
||||
public ResponseEntity<String> readiness(HttpServletRequest request) {
|
||||
ReadinessResult result = ModuleHealthCheckerHolder.getInstance().checkReadiness();
|
||||
if (result.isSuccess()) {
|
||||
return ResponseEntity.ok().body("OK");
|
||||
}
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(result.getResultMessage());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.alibaba.nacos.console.controller;
|
||||
|
||||
import com.alibaba.nacos.api.exception.NacosException;
|
||||
import com.alibaba.nacos.auth.annotation.Secured;
|
||||
import com.alibaba.nacos.common.model.RestResult;
|
||||
import com.alibaba.nacos.common.model.RestResultUtils;
|
||||
import com.alibaba.nacos.common.utils.StringUtils;
|
||||
import com.alibaba.nacos.console.paramcheck.ConsoleDefaultHttpParamExtractor;
|
||||
import com.alibaba.nacos.core.namespace.model.Namespace;
|
||||
import com.alibaba.nacos.core.namespace.repository.NamespacePersistService;
|
||||
import com.alibaba.nacos.core.paramcheck.ExtractorManager;
|
||||
import com.alibaba.nacos.core.service.NamespaceOperationService;
|
||||
import com.alibaba.nacos.plugin.auth.constant.ActionTypes;
|
||||
import com.alibaba.nacos.plugin.auth.impl.constant.AuthConstants;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* namespace service.
|
||||
*
|
||||
* @author Nacos
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/v1/console/namespaces")
|
||||
@ExtractorManager.Extractor(httpExtractor = ConsoleDefaultHttpParamExtractor.class)
|
||||
public class NamespaceController {
|
||||
|
||||
@Autowired
|
||||
private NamespacePersistService namespacePersistService;
|
||||
|
||||
@Autowired
|
||||
private NamespaceOperationService namespaceOperationService;
|
||||
|
||||
private final Pattern namespaceIdCheckPattern = Pattern.compile("^[\\w-]+");
|
||||
|
||||
private final Pattern namespaceNameCheckPattern = Pattern.compile("^[^@#$%^&*]+$");
|
||||
|
||||
private static final int NAMESPACE_ID_MAX_LENGTH = 128;
|
||||
|
||||
/**
|
||||
* Get namespace list.
|
||||
* @return namespace list
|
||||
*/
|
||||
@GetMapping
|
||||
public RestResult<List<Namespace>> getNamespaces() {
|
||||
return RestResultUtils.success(namespaceOperationService.getNamespaceList());
|
||||
}
|
||||
|
||||
/**
|
||||
* get namespace all info by namespace id.
|
||||
* @param namespaceId namespaceId
|
||||
* @return namespace all info
|
||||
*/
|
||||
@GetMapping(params = "show=all")
|
||||
public Namespace getNamespace(@RequestParam("namespaceId") String namespaceId) throws NacosException {
|
||||
return namespaceOperationService.getNamespace(namespaceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* create namespace.
|
||||
* @param namespaceName namespace Name
|
||||
* @param namespaceDesc namespace Desc
|
||||
* @return whether create ok
|
||||
*/
|
||||
@PostMapping
|
||||
@Secured(resource = AuthConstants.CONSOLE_RESOURCE_NAME_PREFIX + "namespaces", action = ActionTypes.WRITE)
|
||||
public Boolean createNamespace(@RequestParam("customNamespaceId") String namespaceId,
|
||||
@RequestParam("namespaceName") String namespaceName,
|
||||
@RequestParam(value = "namespaceDesc", required = false) String namespaceDesc) {
|
||||
if (StringUtils.isBlank(namespaceId)) {
|
||||
namespaceId = UUID.randomUUID().toString();
|
||||
}
|
||||
else {
|
||||
namespaceId = namespaceId.trim();
|
||||
if (!namespaceIdCheckPattern.matcher(namespaceId).matches()) {
|
||||
return false;
|
||||
}
|
||||
if (namespaceId.length() > NAMESPACE_ID_MAX_LENGTH) {
|
||||
return false;
|
||||
}
|
||||
// check unique
|
||||
if (namespacePersistService.tenantInfoCountByTenantId(namespaceId) > 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// contains illegal chars
|
||||
if (!namespaceNameCheckPattern.matcher(namespaceName).matches()) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
return namespaceOperationService.createNamespace(namespaceId, namespaceName, namespaceDesc);
|
||||
}
|
||||
catch (NacosException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* check namespaceId exist.
|
||||
* @param namespaceId namespace id
|
||||
* @return true if exist, otherwise false
|
||||
*/
|
||||
@GetMapping(params = "checkNamespaceIdExist=true")
|
||||
public Boolean checkNamespaceIdExist(@RequestParam("customNamespaceId") String namespaceId) {
|
||||
if (StringUtils.isBlank(namespaceId)) {
|
||||
return false;
|
||||
}
|
||||
return (namespacePersistService.tenantInfoCountByTenantId(namespaceId) > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* edit namespace.
|
||||
* @param namespace namespace
|
||||
* @param namespaceShowName namespace ShowName
|
||||
* @param namespaceDesc namespace Desc
|
||||
* @return whether edit ok
|
||||
*/
|
||||
@PutMapping
|
||||
@Secured(resource = AuthConstants.CONSOLE_RESOURCE_NAME_PREFIX + "namespaces", action = ActionTypes.WRITE)
|
||||
public Boolean editNamespace(@RequestParam("namespace") String namespace,
|
||||
@RequestParam("namespaceShowName") String namespaceShowName,
|
||||
@RequestParam(value = "namespaceDesc", required = false) String namespaceDesc) {
|
||||
// contains illegal chars
|
||||
if (!namespaceNameCheckPattern.matcher(namespaceShowName).matches()) {
|
||||
return false;
|
||||
}
|
||||
return namespaceOperationService.editNamespace(namespace, namespaceShowName, namespaceDesc);
|
||||
}
|
||||
|
||||
/**
|
||||
* del namespace by id.
|
||||
* @param namespaceId namespace Id
|
||||
* @return whether del ok
|
||||
*/
|
||||
@DeleteMapping
|
||||
@Secured(resource = AuthConstants.CONSOLE_RESOURCE_NAME_PREFIX + "namespaces", action = ActionTypes.WRITE)
|
||||
public Boolean deleteNamespace(@RequestParam("namespaceId") String namespaceId) {
|
||||
return namespaceOperationService.removeNamespace(namespaceId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.alibaba.nacos.console.controller;
|
||||
|
||||
import com.alibaba.nacos.common.model.RestResult;
|
||||
import com.alibaba.nacos.common.model.RestResultUtils;
|
||||
import com.alibaba.nacos.console.paramcheck.ConsoleDefaultHttpParamExtractor;
|
||||
import com.alibaba.nacos.core.paramcheck.ExtractorManager;
|
||||
import com.alibaba.nacos.sys.module.ModuleState;
|
||||
import com.alibaba.nacos.sys.module.ModuleStateHolder;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Server state controller.
|
||||
*
|
||||
* @author xingxuechao on:2019/2/27 11:17 AM
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/v1/console/server")
|
||||
@ExtractorManager.Extractor(httpExtractor = ConsoleDefaultHttpParamExtractor.class)
|
||||
public class ServerStateController {
|
||||
|
||||
/**
|
||||
* Get server state of current server.
|
||||
* @return state json.
|
||||
*/
|
||||
@GetMapping("/state")
|
||||
public ResponseEntity<Map<String, String>> serverState() {
|
||||
Map<String, String> serverState = new HashMap<>(4);
|
||||
for (ModuleState each : ModuleStateHolder.getInstance().getAllModuleStates()) {
|
||||
each.getStates().forEach((s, o) -> serverState.put(s, null == o ? null : o.toString()));
|
||||
}
|
||||
return ResponseEntity.ok().body(serverState);
|
||||
}
|
||||
|
||||
@GetMapping("/announcement")
|
||||
public RestResult<String> getAnnouncement(
|
||||
@RequestParam(required = false, name = "language", defaultValue = "zh-CN") String language) {
|
||||
return RestResultUtils.success();
|
||||
}
|
||||
|
||||
@GetMapping("/guide")
|
||||
public RestResult<String> getConsoleUiGuide() {
|
||||
return RestResultUtils.success();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.alibaba.nacos.console.controller.v2;
|
||||
|
||||
import com.alibaba.nacos.api.model.v2.Result;
|
||||
import com.alibaba.nacos.console.paramcheck.ConsoleDefaultHttpParamExtractor;
|
||||
import com.alibaba.nacos.core.cluster.health.ModuleHealthCheckerHolder;
|
||||
import com.alibaba.nacos.core.cluster.health.ReadinessResult;
|
||||
import com.alibaba.nacos.core.paramcheck.ExtractorManager;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* Health ControllerV2.
|
||||
*
|
||||
* @author DiligenceLai
|
||||
*/
|
||||
@RestController("consoleHealthV2")
|
||||
@RequestMapping("/v2/console/health")
|
||||
@ExtractorManager.Extractor(httpExtractor = ConsoleDefaultHttpParamExtractor.class)
|
||||
public class HealthControllerV2 {
|
||||
|
||||
/**
|
||||
* Whether the Nacos is in broken states or not, and cannot recover except by being
|
||||
* restarted.
|
||||
* @return HTTP code equal to 200 indicates that Nacos is in right states. HTTP code
|
||||
* equal to 500 indicates that Nacos is in broken states.
|
||||
*/
|
||||
@GetMapping("/liveness")
|
||||
public Result<String> liveness() {
|
||||
return Result.success("ok");
|
||||
}
|
||||
|
||||
/**
|
||||
* Ready to receive the request or not.
|
||||
* @return HTTP code equal to 200 indicates that Nacos is ready. HTTP code equal to
|
||||
* 500 indicates that Nacos is not ready.
|
||||
*/
|
||||
@GetMapping("/readiness")
|
||||
public Result<String> readiness(HttpServletRequest request) {
|
||||
ReadinessResult result = ModuleHealthCheckerHolder.getInstance().checkReadiness();
|
||||
if (result.isSuccess()) {
|
||||
return Result.success("ok");
|
||||
}
|
||||
return Result.failure(result.getResultMessage());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.alibaba.nacos.console.controller.v2;
|
||||
|
||||
import com.alibaba.nacos.api.annotation.NacosApi;
|
||||
import com.alibaba.nacos.api.exception.NacosException;
|
||||
import com.alibaba.nacos.api.exception.api.NacosApiException;
|
||||
import com.alibaba.nacos.api.model.v2.ErrorCode;
|
||||
import com.alibaba.nacos.api.model.v2.Result;
|
||||
import com.alibaba.nacos.auth.annotation.Secured;
|
||||
import com.alibaba.nacos.common.utils.StringUtils;
|
||||
import com.alibaba.nacos.console.paramcheck.ConsoleDefaultHttpParamExtractor;
|
||||
import com.alibaba.nacos.core.namespace.model.Namespace;
|
||||
import com.alibaba.nacos.core.namespace.model.form.NamespaceForm;
|
||||
import com.alibaba.nacos.core.namespace.repository.NamespacePersistService;
|
||||
import com.alibaba.nacos.core.paramcheck.ExtractorManager;
|
||||
import com.alibaba.nacos.core.service.NamespaceOperationService;
|
||||
import com.alibaba.nacos.plugin.auth.constant.ActionTypes;
|
||||
import com.alibaba.nacos.plugin.auth.constant.SignType;
|
||||
import com.alibaba.nacos.plugin.auth.impl.constant.AuthConstants;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* NamespaceControllerV2.
|
||||
*
|
||||
* @author dongyafei
|
||||
* @date 2022/8/16
|
||||
*/
|
||||
@NacosApi
|
||||
@RestController
|
||||
@RequestMapping("/v2/console/namespace")
|
||||
@ExtractorManager.Extractor(httpExtractor = ConsoleDefaultHttpParamExtractor.class)
|
||||
public class NamespaceControllerV2 {
|
||||
|
||||
private final NamespaceOperationService namespaceOperationService;
|
||||
|
||||
private NamespacePersistService namespacePersistService;
|
||||
|
||||
public NamespaceControllerV2(NamespaceOperationService namespaceOperationService,
|
||||
NamespacePersistService namespacePersistService) {
|
||||
this.namespaceOperationService = namespaceOperationService;
|
||||
this.namespacePersistService = namespacePersistService;
|
||||
}
|
||||
|
||||
private final Pattern namespaceIdCheckPattern = Pattern.compile("^[\\w-]+");
|
||||
|
||||
private final Pattern namespaceNameCheckPattern = Pattern.compile("^[^@#$%^&*]+$");
|
||||
|
||||
private static final int NAMESPACE_ID_MAX_LENGTH = 128;
|
||||
|
||||
/**
|
||||
* Get namespace list.
|
||||
* @return namespace list
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Result<List<Namespace>> getNamespaceList() {
|
||||
return Result.success(namespaceOperationService.getNamespaceList());
|
||||
}
|
||||
|
||||
/**
|
||||
* get namespace all info by namespace id.
|
||||
* @param namespaceId namespaceId
|
||||
* @return namespace all info
|
||||
*/
|
||||
@GetMapping()
|
||||
@Secured(resource = AuthConstants.CONSOLE_RESOURCE_NAME_PREFIX + "namespaces", action = ActionTypes.READ,
|
||||
signType = SignType.CONSOLE)
|
||||
public Result<Namespace> getNamespace(@RequestParam("namespaceId") String namespaceId) throws NacosException {
|
||||
return Result.success(namespaceOperationService.getNamespace(namespaceId));
|
||||
}
|
||||
|
||||
/**
|
||||
* create namespace.
|
||||
* @param namespaceForm namespaceForm.
|
||||
* @return whether create ok
|
||||
*/
|
||||
@PostMapping
|
||||
@Secured(resource = AuthConstants.CONSOLE_RESOURCE_NAME_PREFIX + "namespaces", action = ActionTypes.WRITE,
|
||||
signType = SignType.CONSOLE)
|
||||
public Result<Boolean> createNamespace(NamespaceForm namespaceForm) throws NacosException {
|
||||
|
||||
namespaceForm.validate();
|
||||
|
||||
String namespaceId = namespaceForm.getNamespaceId();
|
||||
String namespaceName = namespaceForm.getNamespaceName();
|
||||
String namespaceDesc = namespaceForm.getNamespaceDesc();
|
||||
|
||||
if (StringUtils.isBlank(namespaceId)) {
|
||||
namespaceId = UUID.randomUUID().toString();
|
||||
}
|
||||
else {
|
||||
namespaceId = namespaceId.trim();
|
||||
if (!namespaceIdCheckPattern.matcher(namespaceId).matches()) {
|
||||
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.ILLEGAL_NAMESPACE,
|
||||
"namespaceId [" + namespaceId + "] mismatch the pattern");
|
||||
}
|
||||
if (namespaceId.length() > NAMESPACE_ID_MAX_LENGTH) {
|
||||
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.ILLEGAL_NAMESPACE,
|
||||
"too long namespaceId, over " + NAMESPACE_ID_MAX_LENGTH);
|
||||
}
|
||||
// check unique
|
||||
if (namespacePersistService.tenantInfoCountByTenantId(namespaceId) > 0) {
|
||||
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.ILLEGAL_NAMESPACE,
|
||||
"the namespaceId is existed, namespaceId: " + namespaceForm.getNamespaceId());
|
||||
}
|
||||
}
|
||||
// contains illegal chars
|
||||
if (!namespaceNameCheckPattern.matcher(namespaceName).matches()) {
|
||||
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.ILLEGAL_NAMESPACE,
|
||||
"namespaceName [" + namespaceName + "] contains illegal char");
|
||||
}
|
||||
return Result.success(namespaceOperationService.createNamespace(namespaceId, namespaceName, namespaceDesc));
|
||||
}
|
||||
|
||||
/**
|
||||
* edit namespace.
|
||||
* @param namespaceForm namespace params
|
||||
* @return whether edit ok
|
||||
*/
|
||||
@PutMapping
|
||||
@Secured(resource = AuthConstants.CONSOLE_RESOURCE_NAME_PREFIX + "namespaces", action = ActionTypes.WRITE,
|
||||
signType = SignType.CONSOLE)
|
||||
public Result<Boolean> editNamespace(NamespaceForm namespaceForm) throws NacosException {
|
||||
namespaceForm.validate();
|
||||
// contains illegal chars
|
||||
if (!namespaceNameCheckPattern.matcher(namespaceForm.getNamespaceName()).matches()) {
|
||||
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.ILLEGAL_NAMESPACE,
|
||||
"namespaceName [" + namespaceForm.getNamespaceName() + "] contains illegal char");
|
||||
}
|
||||
return Result.success(namespaceOperationService.editNamespace(namespaceForm.getNamespaceId(),
|
||||
namespaceForm.getNamespaceName(), namespaceForm.getNamespaceDesc()));
|
||||
}
|
||||
|
||||
/**
|
||||
* delete namespace by id.
|
||||
* @param namespaceId namespace ID
|
||||
* @return whether delete ok
|
||||
*/
|
||||
@DeleteMapping
|
||||
@Secured(resource = AuthConstants.CONSOLE_RESOURCE_NAME_PREFIX + "namespaces", action = ActionTypes.WRITE,
|
||||
signType = SignType.CONSOLE)
|
||||
public Result<Boolean> deleteNamespace(@RequestParam("namespaceId") String namespaceId) {
|
||||
return Result.success(namespaceOperationService.removeNamespace(namespaceId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.alibaba.nacos.console.exception;
|
||||
|
||||
import com.alibaba.nacos.api.exception.runtime.NacosRuntimeException;
|
||||
import com.alibaba.nacos.common.model.RestResultUtils;
|
||||
import com.alibaba.nacos.common.utils.ExceptionUtil;
|
||||
import com.alibaba.nacos.core.utils.Commons;
|
||||
import com.alibaba.nacos.plugin.auth.exception.AccessException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.util.HtmlUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* Exception handler for console module.
|
||||
*
|
||||
* @author nkorange
|
||||
* @since 1.2.0
|
||||
*/
|
||||
@ControllerAdvice
|
||||
public class ConsoleExceptionHandler {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ConsoleExceptionHandler.class);
|
||||
|
||||
@ExceptionHandler(AccessException.class)
|
||||
private ResponseEntity<String> handleAccessException(AccessException e) {
|
||||
LOGGER.error("got exception. {}", e.getErrMsg());
|
||||
return ResponseEntity.status(HttpStatus.FORBIDDEN).body(e.getErrMsg());
|
||||
}
|
||||
|
||||
@ExceptionHandler(IllegalArgumentException.class)
|
||||
private ResponseEntity<String> handleIllegalArgumentException(IllegalArgumentException e) {
|
||||
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(ExceptionUtil.getAllExceptionMsg(e));
|
||||
}
|
||||
|
||||
@ExceptionHandler(NacosRuntimeException.class)
|
||||
private ResponseEntity<String> handleNacosRuntimeException(NacosRuntimeException e) {
|
||||
LOGGER.error("got exception. {}", e.getMessage());
|
||||
return ResponseEntity.status(e.getErrCode()).body(ExceptionUtil.getAllExceptionMsg(e));
|
||||
}
|
||||
|
||||
@ExceptionHandler(Exception.class)
|
||||
private ResponseEntity<Object> handleException(HttpServletRequest request, Exception e) {
|
||||
String uri = request.getRequestURI();
|
||||
LOGGER.error("CONSOLE {}", uri, e);
|
||||
if (uri.contains(Commons.NACOS_SERVER_VERSION_V2)) {
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||
.body(RestResultUtils.failed(HtmlUtils.htmlEscape(ExceptionUtil.getAllExceptionMsg(e), "utf-8")));
|
||||
}
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||
.body(HtmlUtils.htmlEscape(ExceptionUtil.getAllExceptionMsg(e), "utf-8"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.alibaba.nacos.console.exception;
|
||||
|
||||
import com.alibaba.nacos.api.annotation.NacosApi;
|
||||
import com.alibaba.nacos.api.exception.NacosException;
|
||||
import com.alibaba.nacos.api.exception.api.NacosApiException;
|
||||
import com.alibaba.nacos.api.exception.runtime.NacosRuntimeException;
|
||||
import com.alibaba.nacos.api.model.v2.ErrorCode;
|
||||
import com.alibaba.nacos.api.model.v2.Result;
|
||||
import com.alibaba.nacos.common.utils.ExceptionUtil;
|
||||
import com.alibaba.nacos.plugin.auth.exception.AccessException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.http.converter.HttpMessageConversionException;
|
||||
import org.springframework.http.converter.HttpMessageNotReadableException;
|
||||
import org.springframework.web.HttpMediaTypeException;
|
||||
import org.springframework.web.bind.MissingServletRequestParameterException;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Exception Handler for Nacos API.
|
||||
*
|
||||
* @author dongyafei
|
||||
* @date 2022/7/22
|
||||
*/
|
||||
|
||||
@Order(-1)
|
||||
@ControllerAdvice(annotations = { NacosApi.class })
|
||||
@ResponseBody
|
||||
public class NacosApiExceptionHandler {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(NacosApiExceptionHandler.class);
|
||||
|
||||
@ExceptionHandler(NacosApiException.class)
|
||||
public ResponseEntity<Result<String>> handleNacosApiException(NacosApiException e) {
|
||||
LOGGER.error("got exception. {} {}", e.getErrAbstract(), e.getErrMsg());
|
||||
return ResponseEntity.status(e.getErrCode())
|
||||
.body(new Result<>(e.getDetailErrCode(), e.getErrAbstract(), e.getErrMsg()));
|
||||
}
|
||||
|
||||
@ExceptionHandler(NacosException.class)
|
||||
public ResponseEntity<Result<String>> handleNacosException(NacosException e) {
|
||||
LOGGER.error("got exception. {}", e.getErrMsg());
|
||||
return ResponseEntity.status(e.getErrCode()).body(Result.failure(ErrorCode.SERVER_ERROR, e.getErrMsg()));
|
||||
}
|
||||
|
||||
@ExceptionHandler(NacosRuntimeException.class)
|
||||
public ResponseEntity<Result<String>> handleNacosRuntimeException(NacosRuntimeException e) {
|
||||
LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
|
||||
return ResponseEntity.status(e.getErrCode()).body(Result.failure(ErrorCode.SERVER_ERROR, e.getMessage()));
|
||||
}
|
||||
|
||||
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||
@ExceptionHandler(HttpMessageNotReadableException.class)
|
||||
public Result<String> handleHttpMessageNotReadableException(HttpMessageNotReadableException e) {
|
||||
LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
|
||||
return Result.failure(ErrorCode.PARAMETER_MISSING, e.getMessage());
|
||||
}
|
||||
|
||||
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||
@ExceptionHandler(HttpMessageConversionException.class)
|
||||
public Result<String> handleHttpMessageConversionException(HttpMessageConversionException e) {
|
||||
LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
|
||||
return Result.failure(ErrorCode.PARAMETER_VALIDATE_ERROR, e.getMessage());
|
||||
}
|
||||
|
||||
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||
@ExceptionHandler(NumberFormatException.class)
|
||||
public Result<String> handleNumberFormatException(NumberFormatException e) {
|
||||
LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
|
||||
return Result.failure(ErrorCode.PARAMETER_VALIDATE_ERROR, e.getMessage());
|
||||
}
|
||||
|
||||
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||
@ExceptionHandler(IllegalArgumentException.class)
|
||||
public Result<String> handleIllegalArgumentException(IllegalArgumentException e) {
|
||||
LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
|
||||
return Result.failure(ErrorCode.PARAMETER_VALIDATE_ERROR, e.getMessage());
|
||||
}
|
||||
|
||||
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||
@ExceptionHandler(MissingServletRequestParameterException.class)
|
||||
public Result<String> handleMissingServletRequestParameterException(MissingServletRequestParameterException e) {
|
||||
LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
|
||||
return Result.failure(ErrorCode.PARAMETER_MISSING, e.getMessage());
|
||||
}
|
||||
|
||||
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||
@ExceptionHandler(HttpMediaTypeException.class)
|
||||
public Result<String> handleHttpMediaTypeException(HttpMediaTypeException e) {
|
||||
LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
|
||||
return Result.failure(ErrorCode.MEDIA_TYPE_ERROR, e.getMessage());
|
||||
}
|
||||
|
||||
@ResponseStatus(HttpStatus.FORBIDDEN)
|
||||
@ExceptionHandler(AccessException.class)
|
||||
public Result<String> handleAccessException(AccessException e) {
|
||||
LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
|
||||
return Result.failure(ErrorCode.ACCESS_DENIED, e.getErrMsg());
|
||||
}
|
||||
|
||||
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||
@ExceptionHandler(value = { DataAccessException.class, ServletException.class, IOException.class })
|
||||
public Result<String> handleDataAccessException(Exception e) {
|
||||
LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
|
||||
return Result.failure(ErrorCode.DATA_ACCESS_ERROR, e.getMessage());
|
||||
}
|
||||
|
||||
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||
@ExceptionHandler(Exception.class)
|
||||
public Result<String> handleOtherException(Exception e) {
|
||||
LOGGER.error("got exception. {} {}", e.getMessage(), ExceptionUtil.getAllExceptionMsg(e));
|
||||
return Result.failure(e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.alibaba.nacos.console.filter;
|
||||
|
||||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* XSS filter.
|
||||
*
|
||||
* @author onewe
|
||||
*/
|
||||
public class XssFilter extends OncePerRequestFilter {
|
||||
|
||||
private static final String CONTENT_SECURITY_POLICY_HEADER = "Content-Security-Policy";
|
||||
|
||||
private static final String CONTENT_SECURITY_POLICY = "script-src 'self'";
|
||||
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
|
||||
throws ServletException, IOException {
|
||||
|
||||
response.setHeader(CONTENT_SECURITY_POLICY_HEADER, CONTENT_SECURITY_POLICY);
|
||||
filterChain.doFilter(request, response);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.alibaba.nacos.console.paramcheck;
|
||||
|
||||
import com.alibaba.nacos.common.paramcheck.ParamInfo;
|
||||
import com.alibaba.nacos.common.utils.StringUtils;
|
||||
import com.alibaba.nacos.core.paramcheck.AbstractHttpParamExtractor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Console default http param extractor.
|
||||
*
|
||||
* @author zhuoguang
|
||||
*/
|
||||
public class ConsoleDefaultHttpParamExtractor extends AbstractHttpParamExtractor {
|
||||
|
||||
@Override
|
||||
public List<ParamInfo> extractParam(HttpServletRequest request) {
|
||||
ParamInfo paramInfo = new ParamInfo();
|
||||
paramInfo.setNamespaceId(getAliasNamespaceId(request));
|
||||
paramInfo.setNamespaceShowName(getAliasNamespaceShowName(request));
|
||||
ArrayList<ParamInfo> paramInfos = new ArrayList<>();
|
||||
paramInfos.add(paramInfo);
|
||||
return paramInfos;
|
||||
}
|
||||
|
||||
private String getAliasNamespaceId(HttpServletRequest request) {
|
||||
String namespaceId = request.getParameter("namespaceId");
|
||||
if (StringUtils.isBlank(namespaceId)) {
|
||||
namespaceId = request.getParameter("customNamespaceId");
|
||||
}
|
||||
return namespaceId;
|
||||
}
|
||||
|
||||
private String getAliasNamespaceShowName(HttpServletRequest request) {
|
||||
String namespaceShowName = request.getParameter("namespaceName");
|
||||
return namespaceShowName;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# Copyright 1999-2023 Alibaba Group Holding Ltd.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
com.alibaba.nacos.console.paramcheck.ConsoleDefaultHttpParamExtractor
|
||||
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# Copyright 1999-2023 Alibaba Group Holding Ltd.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
com.alibaba.nacos.console.config.ConsoleModuleStateBuilder
|
||||
52
remi-nacos/src/main/resources/application.yml
Normal file
52
remi-nacos/src/main/resources/application.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
server:
|
||||
port: 8848
|
||||
tomcat:
|
||||
basedir: logs
|
||||
error:
|
||||
include-message: always
|
||||
db:
|
||||
num: 1
|
||||
user: ${MYSQL_USER:root}
|
||||
password: ${MYSQL_PWD:Remi@123}
|
||||
url:
|
||||
0: jdbc:mysql://${MYSQL_HOST:192.168.31.18}:${MYSQL_PORT:3306}/${MYSQL_DB:remi-cloud}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
#0: jdbc:mysql://${MYSQL_HOST:192.168.31.66}:${MYSQL_PORT:3306}/${MYSQL_DB:sit-cloud}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
pool:
|
||||
config:
|
||||
connectionTimeout: 30000
|
||||
validationTimeout: 10000
|
||||
|
||||
nacos:
|
||||
core:
|
||||
auth:
|
||||
server:
|
||||
identity:
|
||||
key: serverIdentity
|
||||
value: security
|
||||
system.type: nacos
|
||||
plugin.nacos.token.secret.key: SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||
security:
|
||||
ignore:
|
||||
urls: /actuator/**,/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: @project.artifactId@
|
||||
datasource:
|
||||
platform: mysql #这个过期属性不能修改,nacos 代码对此有硬编码
|
||||
security:
|
||||
enabled: true
|
||||
|
||||
useAddressServer: true
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
metrics:
|
||||
export:
|
||||
influx:
|
||||
enabled: false
|
||||
elastic:
|
||||
enabled: false
|
||||
24
remi-nacos/src/main/resources/docker/Dockerfile
Normal file
24
remi-nacos/src/main/resources/docker/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
# Docker image for springboot application
|
||||
# VERSION 0.0.1
|
||||
# Author: DianJiu
|
||||
# 指定基础镜像,这是分阶段构建的前期阶段
|
||||
FROM harbor.njydsz.com/library/jdk:17 as builder
|
||||
# 维护者
|
||||
MAINTAINER Remi <remi@yundingshuzi.com>
|
||||
#VOLUME:挂载目录
|
||||
VOLUME /temp
|
||||
|
||||
#ADD 将app.jar文件将拷贝到容器中,默认拷贝到根路径下
|
||||
#也可以直接写成ADD app.jar /app.jar 或者 ADD app.jar /
|
||||
ADD remi-nacos-3.1.0.jar remi-nacos.jar
|
||||
|
||||
#修改app.jar这个文件的访问时间和修改时间为当前时间,而不会修改文件的内容。
|
||||
RUN bash -c "touch /remi-nacos.jar"
|
||||
|
||||
#ENTRYPOINT 应用启动命令 参数设定
|
||||
#由于tomcat的session id的生成主要通过java.security.SecureRandom生成随机数来实现,导致启动过程很慢
|
||||
#通过-Djava.security.egd=file:/dev/./urandom参数可以加快随机数产生过程
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/remi-nacos.jar"]
|
||||
|
||||
#EXPOSE 容器暴露端口
|
||||
EXPOSE 8848
|
||||
5
remi-nacos/src/main/resources/docker/README.md
Normal file
5
remi-nacos/src/main/resources/docker/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
```shell
|
||||
sh ./docker_deploy.sh
|
||||
|
||||
docker logs -f gateway
|
||||
```
|
||||
15
remi-nacos/src/main/resources/docker/docker_deploy.sh
Normal file
15
remi-nacos/src/main/resources/docker/docker_deploy.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#先删除原有的镜像
|
||||
docker stop sit-remi-base-nacos
|
||||
docker rm -f sit-remi-base-nacos
|
||||
docker images | grep sit-remi-base-nacos | awk '{print $3}' | xargs docker rmi -f
|
||||
docker build -t sit-remi-base-nacos .
|
||||
docker images | grep sit-remi-base-nacos
|
||||
#把新镜像推送到私服
|
||||
docker login -uadmin -pYdsz1020 harbor.njydsz.com
|
||||
docker tag sit-remi-base-nacos harbor.njydsz.com/remi/sit-remi-base-nacos:3.1.0
|
||||
docker tag sit-remi-base-nacos harbor.njydsz.com/remi/sit-remi-base-nacos
|
||||
docker push harbor.njydsz.com/remi/sit-remi-base-nacos:3.1.0
|
||||
docker push harbor.njydsz.com/remi/sit-remi-base-nacos
|
||||
#启动最新的镜像服务
|
||||
docker run --restart=always -t -dit -p 8848:8848 --name sit-remi-base-nacos sit-remi-base-nacos
|
||||
docker ps -a
|
||||
1
remi-nacos/src/main/resources/nacos-version.txt
Normal file
1
remi-nacos/src/main/resources/nacos-version.txt
Normal file
@@ -0,0 +1 @@
|
||||
version=2.3.2-OEM
|
||||
7127
remi-nacos/src/main/resources/static/console-ui/public/css/bootstrap.css
vendored
Normal file
7127
remi-nacos/src/main/resources/static/console-ui/public/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,356 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* BASICS */
|
||||
|
||||
.CodeMirror {
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0; /* Vertical padding around content */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker { color: black; }
|
||||
.CodeMirror-guttermarker-subtle { color: #999; }
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.cm-fat-cursor .CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0 !important;
|
||||
background: #7e7;
|
||||
}
|
||||
.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
background-color: #7e7;
|
||||
}
|
||||
@-moz-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
.CodeMirror-overwrite .CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-rulers {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: -50px; bottom: -20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0; bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default .cm-header {color: blue;}
|
||||
.cm-s-default .cm-quote {color: #090;}
|
||||
.cm-negative {color: #d44;}
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
.cm-strikethrough {text-decoration: line-through;}
|
||||
|
||||
.cm-s-default .cm-keyword {color: #708;}
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
.cm-s-default .cm-tag {color: #170;}
|
||||
.cm-s-default .cm-attribute {color: #00c;}
|
||||
.cm-s-default .cm-hr {color: #999;}
|
||||
.cm-s-default .cm-link {color: #00c;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
.CodeMirror-composing { border-bottom: 2px solid; }
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -30px; margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 30px solid transparent;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actual scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
}
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0; top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0; left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
min-height: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: -30px;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.CodeMirror-gutter-background {
|
||||
position: absolute;
|
||||
top: 0; bottom: 0;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
|
||||
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-variant-ligatures: contextual;
|
||||
font-variant-ligatures: contextual;
|
||||
}
|
||||
.CodeMirror-wrap pre {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-rtl pre { direction: rtl; }
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
div.CodeMirror-dragcursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
|
||||
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background: #ffa;
|
||||
background: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after { content: ''; }
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext { background: none; }
|
||||
File diff suppressed because one or more lines are too long
2102
remi-nacos/src/main/resources/static/console-ui/public/css/font-awesome.css
vendored
Normal file
2102
remi-nacos/src/main/resources/static/console-ui/public/css/font-awesome.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,265 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
@font-face {
|
||||
/*无边框*/
|
||||
font-family: "iconfont-1";
|
||||
src: url('icon1/iconfont.eot?t=1458627591'); /* IE9*/
|
||||
src: url('icon1/iconfont.eot?t=1458627591#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('icon1/iconfont.woff?t=1458627591') format('woff'), /* chrome, firefox */ url('icon1/iconfont.ttf?t=1458627591') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ url('icon1/iconfont.svg?t=1458627591#iconfont') format('svg'); /* iOS 4.1- */
|
||||
}
|
||||
|
||||
@font-face {
|
||||
/*有边框*/
|
||||
font-family: "iconfont-2";
|
||||
src: url('icon/iconfont.eot'); /* IE9*/
|
||||
src: url('icon/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('icon/iconfont.woff') format('woff'), /* chrome, firefox */ url('icon/iconfont.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ url('icon/iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
/* 有边框 */
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.2px;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.iconfont-1 {
|
||||
/*无边框*/
|
||||
|
||||
font-family: "iconfont-1" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.2px;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.iconfont-2 {
|
||||
/*有边框*/
|
||||
font-family: "iconfont-2" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-stroke-width: 0.2px;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.logo {
|
||||
|
||||
}
|
||||
|
||||
.panel-logo {
|
||||
padding-right: 2px;
|
||||
font-size: 18px;
|
||||
display: inline-block;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.icon-lg {
|
||||
font-size: 80px !important;
|
||||
}
|
||||
|
||||
.icon-size-md {
|
||||
font-size: 40px !important;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.icon-size-lg {
|
||||
font-size: 80px !important;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.icon-hsf:before {
|
||||
content: "\e62f" !important;
|
||||
}
|
||||
|
||||
.icon-rocketmq:before {
|
||||
content: "\e632" !important;
|
||||
}
|
||||
|
||||
.icon-notify:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-tddl:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-pandora:before {
|
||||
content: "\e622" !important;
|
||||
}
|
||||
|
||||
.icon-ailtomcat:before {
|
||||
content: "\e628" !important;
|
||||
}
|
||||
|
||||
.icon-configserver:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-diamondserver:before {
|
||||
content: "\e62a" !important;
|
||||
}
|
||||
|
||||
.icon-vipserver:before {
|
||||
content: "\e625" !important;
|
||||
}
|
||||
|
||||
.icon-eagleeye:before {
|
||||
content: "\e62c" !important;
|
||||
}
|
||||
|
||||
.icon-tengine:before {
|
||||
content: "\e635" !important;
|
||||
}
|
||||
|
||||
.icon-tair:before {
|
||||
content: "\e634" !important;
|
||||
}
|
||||
|
||||
.icon-hbase:before {
|
||||
content: "\e62d" !important;
|
||||
}
|
||||
|
||||
.icon-jstorm:before {
|
||||
content: "\e627" !important;
|
||||
}
|
||||
|
||||
.icon-histore:before {
|
||||
content: "\e62e" !important;
|
||||
}
|
||||
|
||||
.icon-jingwei:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-txc:before {
|
||||
content: "\e636" !important;
|
||||
}
|
||||
|
||||
.icon-edas:before {
|
||||
content: "\e620" !important;
|
||||
}
|
||||
|
||||
.icon-csb:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-ons:before {
|
||||
content: "\e630" !important;
|
||||
}
|
||||
|
||||
.icon-drds:before {
|
||||
content: "\e61f" !important;
|
||||
}
|
||||
|
||||
.icon-duct:before {
|
||||
content: "\e62b" !important;
|
||||
}
|
||||
|
||||
.icon-amazon:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-autoload:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-switch:before {
|
||||
content: "\e633" !important;
|
||||
}
|
||||
|
||||
.icon-sentinel:before {
|
||||
content: "\e623" !important;
|
||||
}
|
||||
|
||||
.icon-preplan:before {
|
||||
content: "\e631" !important;
|
||||
}
|
||||
|
||||
.icon-moses:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-zeus:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-athena:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-bcp:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-lark:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-nest:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-monkeyking:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-tab:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-oceanus:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-eos :before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-sonar:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-ai:before {
|
||||
content: "\e605" !important;
|
||||
}
|
||||
|
||||
.icon-hotcode:before {
|
||||
content: "\e621" !important;
|
||||
}
|
||||
|
||||
.icon-taokeeper:before {
|
||||
content: "\e624" !important;
|
||||
}
|
||||
|
||||
.icon-mdl:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-mw:before {
|
||||
content: "\e61e" !important;
|
||||
}
|
||||
|
||||
.icon-default:before {
|
||||
content: "\e607" !important;
|
||||
}
|
||||
|
||||
.icon-alitomcat:before {
|
||||
content: "\e607" !important;
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
.CodeMirror-merge {
|
||||
position: relative;
|
||||
border: 1px solid #ddd;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.CodeMirror-merge, .CodeMirror-merge .CodeMirror {
|
||||
height: 350px;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 47%; }
|
||||
.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 6%; }
|
||||
.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }
|
||||
.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }
|
||||
|
||||
.CodeMirror-merge-pane {
|
||||
display: inline-block;
|
||||
white-space: normal;
|
||||
vertical-align: top;
|
||||
}
|
||||
.CodeMirror-merge-pane-rightmost {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-gap {
|
||||
z-index: 2;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
border-left: 1px solid #ddd;
|
||||
border-right: 1px solid #ddd;
|
||||
position: relative;
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-scrolllock-wrap {
|
||||
position: absolute;
|
||||
bottom: 0; left: 50%;
|
||||
}
|
||||
.CodeMirror-merge-scrolllock {
|
||||
position: relative;
|
||||
left: -50%;
|
||||
cursor: pointer;
|
||||
color: #555;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
right: 0; bottom: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copy {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
color: #44c;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copy-reverse {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
color: #44c;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }
|
||||
.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }
|
||||
|
||||
.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);
|
||||
background-position: bottom left;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);
|
||||
background-position: bottom left;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-r-chunk { background: #ffffe0; }
|
||||
.CodeMirror-merge-r-chunk-start { border-top: 1px solid #ee8; }
|
||||
.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #ee8; }
|
||||
.CodeMirror-merge-r-connect { fill: #ffffe0; stroke: #ee8; stroke-width: 1px; }
|
||||
|
||||
.CodeMirror-merge-l-chunk { background: #eef; }
|
||||
.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }
|
||||
.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }
|
||||
.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }
|
||||
|
||||
.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }
|
||||
.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }
|
||||
.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }
|
||||
|
||||
.CodeMirror-merge-collapsed-widget:before {
|
||||
content: "(...)";
|
||||
}
|
||||
.CodeMirror-merge-collapsed-widget {
|
||||
cursor: pointer;
|
||||
color: #88b;
|
||||
background: #eef;
|
||||
border: 1px solid #ddf;
|
||||
font-size: 90%;
|
||||
padding: 0 3px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user