升级Spring Cloud Hoxton & Alibaba,认证授权改用Oauth2。

This commit is contained in:
macro
2020-08-15 10:51:40 +08:00
parent d004888a10
commit dae82f62ed
258 changed files with 4671 additions and 3092 deletions

View File

@@ -0,0 +1,29 @@
aliyun:
oss:
endpoint: oss-cn-shenzhen.aliyuncs.com # oss对外服务的访问域名
accessKeyId: test # 访问身份验证中用到用户标识
accessKeySecret: test # 用户用于加密签名字符串和oss用来验证签名字符串的密钥
bucketName: macro-oss # oss的存储空间
policy:
expire: 300 # 签名有效期(S)
maxSize: 10 # 上传文件大小(M)
callback: http://39.98.190.128:8080/aliyun/oss/callback # 文件上传成功后的回调地址
dir:
prefix: mall/images/ # 上传文件夹路径前缀
spring:
datasource:
url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
redis:
host: localhost # Redis服务器地址
database: 0 # Redis数据库索引默认为0
port: 6379 # Redis服务器连接端口
password: # Redis服务器连接密码默认为空
timeout: 3000ms # 连接超时时间(毫秒)
logging:
level:
root: info
com.macro.mall: debug
logstash:
host: localhost

View File

@@ -0,0 +1,30 @@
aliyun:
oss:
endpoint: oss-cn-shenzhen.aliyuncs.com # oss对外服务的访问域名
accessKeyId: test # 访问身份验证中用到用户标识
accessKeySecret: test # 用户用于加密签名字符串和oss用来验证签名字符串的密钥
bucketName: macro-oss # oss的存储空间
policy:
expire: 300 # 签名有效期(S)
maxSize: 10 # 上传文件大小(M)
callback: http://39.98.190.128:8080/aliyun/oss/callback # 文件上传成功后的回调地址
dir:
prefix: mall/images/ # 上传文件夹路径前缀
spring:
datasource:
url: jdbc:mysql://db:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: reader
password: 123456
redis:
host: redis # Redis服务器地址
database: 0 # Redis数据库索引默认为0
port: 6379 # Redis服务器连接端口
password: #不设置密码
logging:
file:
path: /var/logs
level:
root: info
com.macro.mall: info
logstash:
host: logstash

View File

@@ -0,0 +1,11 @@
spring:
datasource:
url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
logging:
level:
root: info
com.macro.mall: debug
logstash:
host: localhost

View File

@@ -0,0 +1,13 @@
spring:
datasource:
url: jdbc:mysql://db:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: reader
password: 123456
logging:
file:
path: /var/logs
level:
root: info
com.macro.mall: info
logstash:
host: logstash

View File

@@ -0,0 +1,18 @@
spring:
redis:
host: localhost # Redis服务器地址
database: 0 # Redis数据库索引默认为0
port: 6379 # Redis服务器连接端口
password: # Redis服务器连接密码默认为空
timeout: 3000ms # 连接超时时间(毫秒)
security:
oauth2:
resourceserver:
jwt:
jwk-set-uri: 'http://localhost:8201/mall-auth/rsa/publicKey'
logging:
level:
root: info
com.macro.mall: debug
logstash:
host: localhost

View File

@@ -0,0 +1,19 @@
spring:
redis:
host: redis # Redis服务器地址
database: 0 # Redis数据库索引默认为0
port: 6379 # Redis服务器连接端口
password: #不设置密码
security:
oauth2:
resourceserver:
jwt:
jwk-set-uri: 'http://mall-gateway:8201/mall-auth/rsa/publicKey'
logging:
file:
path: /var/logs
level:
root: info
com.macro.mall: info
logstash:
host: logstash

View File

@@ -0,0 +1,28 @@
spring:
datasource:
url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
data:
mongodb:
host: localhost
port: 27017
database: mall-port
redis:
host: localhost # Redis服务器地址
database: 0 # Redis数据库索引默认为0
port: 6379 # Redis服务器连接端口
password: # Redis服务器连接密码默认为空
rabbitmq:
host: localhost
port: 5672
virtual-host: /mall
username: mall
password: mall
# 日志配置
logging:
level:
root: info
com.macro.mall: debug
logstash:
host: localhost

View File

@@ -0,0 +1,31 @@
spring:
datasource:
url: jdbc:mysql://db:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
data:
mongodb:
host: mongo
port: 27017
database: mall-port
redis:
host: redis # Redis服务器地址
database: 0 # Redis数据库索引默认为0
port: 6379 # Redis服务器连接端口
password: #不设置密码
rabbitmq:
host: rabbit
port: 5672
virtual-host: /mall
username: mall
password: mall
publisher-confirms: true #如果对异步消息需要回调必须设置为true
logging:
file:
path: /var/logs
level:
root: info
com.macro.mall: info
logstash:
host: logstash

View File

@@ -0,0 +1,14 @@
spring:
datasource:
url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
elasticsearch:
rest:
uris: http://localhost:9200
logging:
level:
root: info
com.macro.mall: debug
logstash:
host: localhost

View File

@@ -0,0 +1,20 @@
spring:
datasource:
url: jdbc:mysql://db:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: reader
password: 123456
elasticsearch:
rest:
uris: http://es:9200
management:
health:
elasticsearch:
response-timeout: 1000ms #加大健康检查超时时间
logging:
file:
path: /var/logs
level:
root: info
com.macro.mall: info
logstash:
host: logstash