7 changed files with 118 additions and 27 deletions
@ -1,25 +0,0 @@
|
||||
# ---> Java |
||||
# Compiled class file |
||||
*.class |
||||
|
||||
# Log file |
||||
*.log |
||||
|
||||
# BlueJ files |
||||
*.ctxt |
||||
|
||||
# Mobile Tools for Java (J2ME) |
||||
.mtj.tmp/ |
||||
|
||||
# Package Files # |
||||
*.jar |
||||
*.war |
||||
*.nar |
||||
*.ear |
||||
*.zip |
||||
*.tar.gz |
||||
*.rar |
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml |
||||
hs_err_pid* |
||||
|
@ -0,0 +1,44 @@
|
||||
# 暴露监控端点 |
||||
management: |
||||
endpoints: |
||||
web: |
||||
exposure: |
||||
include: '*' |
||||
endpoint: |
||||
health: |
||||
show-details: always |
||||
|
||||
# feign 配置 |
||||
feign: |
||||
# 开启断路器 |
||||
hystrix: |
||||
enabled: true |
||||
okhttp: |
||||
enabled: true |
||||
httpclient: |
||||
enabled: false |
||||
client: |
||||
config: |
||||
default: |
||||
connectTimeout: 10000 |
||||
readTimeout: 10000 |
||||
# 请求和响应的压缩配置 |
||||
compression: |
||||
request: |
||||
enabled: true |
||||
mime-types: text/xml;application/xml;application/json |
||||
min-request-size: 2048 |
||||
response: |
||||
enabled: true |
||||
|
||||
# 负载均衡请求处理的超时时间 |
||||
ribbon: |
||||
ReadTimeout: 10000 |
||||
ConnectTimeout: 10000 |
||||
|
||||
# 设置日志级别 |
||||
logging: |
||||
level: |
||||
com: |
||||
zsw: |
||||
cloud: debug |
@ -0,0 +1,32 @@
|
||||
spring: |
||||
# 数据库配置 |
||||
datasource: |
||||
type: com.zaxxer.hikari.HikariDataSource |
||||
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
||||
# 持久层配置 |
||||
mybatis-plus: |
||||
# 开启租户数据维护 |
||||
tenant-enabled: true |
||||
mapper-locations: classpath*:mappers/*.xml |
||||
#实体扫描,多个package用逗号或者分号分隔 |
||||
type-aliases-package: com.zsw.cloud.*.entity |
||||
global-config: |
||||
# 关闭MP3.x自带的banner |
||||
banner: false |
||||
db-config: |
||||
#主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID"; |
||||
id-type: ASSIGN_ID |
||||
#字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断" |
||||
field-strategy: NOT_EMPTY |
||||
#驼峰下划线转换 |
||||
column-underline: true |
||||
#逻辑删除配置 |
||||
logic-delete-field: deleted |
||||
logic-delete-value: 1 |
||||
logic-not-delete-value: 0 |
||||
refresh: true |
||||
configuration: |
||||
map-underscore-to-camel-case: true |
||||
cache-enabled: false |
||||
call-setters-on-nulls: true |
@ -0,0 +1,13 @@
|
||||
# Redis主缓存配置 |
||||
spring: |
||||
redis: |
||||
host: 127.0.0.1 |
||||
port: 6379 |
||||
database: 6 |
||||
timeout: 6000 |
||||
lettuce: |
||||
pool: |
||||
max-active: 10 |
||||
max-wait: -1ms |
||||
max-idle: 10 |
||||
min-idle: 2 |
@ -0,0 +1,6 @@
|
||||
spring: |
||||
# 数据库配置 |
||||
datasource: |
||||
url: jdbc:mysql://127.0.0.1:3306/zsw_auth?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&failOverReadOnly=false&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=GMT%2B8 |
||||
username: zsw_auth |
||||
password: zsw_auth_2022 |
@ -0,0 +1,23 @@
|
||||
spring: |
||||
# 数据库配置 |
||||
datasource: |
||||
url: jdbc:mysql://127.0.0.1:3306/zsw_user?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&failOverReadOnly=false&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=GMT%2B8 |
||||
username: zsw_user |
||||
password: zsw_user_2022 |
||||
|
||||
zsw: |
||||
tenant: |
||||
column: tenant_id |
||||
tables: |
||||
- user |
||||
|
||||
# Oauth2安全配置 |
||||
security: |
||||
oauth2: |
||||
client: |
||||
client-id: zswUser |
||||
client-secret: zswUser666 |
||||
access-token-uri: http://zsw-auth/oauth/token |
||||
user-authorization-uri: http://zsw-auth/oauth/authorize |
||||
resource: |
||||
token-info-uri: http://zsw-auth/oauth/check_token |
Loading…
Reference in new issue