feat: 增加access_token过滤器
This commit is contained in:
parent
5cf30a74e8
commit
11c5853a46
@ -34,6 +34,10 @@ public class UserExpandDTO extends UserDTO {
|
||||
private Integer relationIcRebateRatio;
|
||||
private String relationIcTime;
|
||||
private String relationIcUserId;
|
||||
private String subUserIds;
|
||||
private String mainUserId;
|
||||
private String wxMiniappOpenId;
|
||||
private String wxOfficialAccountOpenId;
|
||||
|
||||
public Long getPriceAdditionalPkg() {
|
||||
return priceAdditionalPkg == null ? 0 : priceAdditionalPkg;
|
||||
@ -218,4 +222,37 @@ public class UserExpandDTO extends UserDTO {
|
||||
public void setRelationIcUserId(String relationIcUserId) {
|
||||
this.relationIcUserId = relationIcUserId;
|
||||
}
|
||||
|
||||
public String getSubUserIds() {
|
||||
return subUserIds == null ? "" : subUserIds.trim();
|
||||
}
|
||||
|
||||
public void setSubUserIds(String subUserIds) {
|
||||
this.subUserIds = subUserIds;
|
||||
}
|
||||
|
||||
public String getMainUserId() {
|
||||
return mainUserId == null ? "" : mainUserId.trim();
|
||||
}
|
||||
|
||||
public void setMainUserId(String mainUserId) {
|
||||
this.mainUserId = mainUserId;
|
||||
}
|
||||
|
||||
public String getWxMiniappOpenId() {
|
||||
return wxMiniappOpenId == null ? "" : wxMiniappOpenId.trim();
|
||||
}
|
||||
|
||||
public void setWxMiniappOpenId(String wxMiniappOpenId) {
|
||||
this.wxMiniappOpenId = wxMiniappOpenId;
|
||||
}
|
||||
|
||||
|
||||
public String getWxOfficialAccountOpenId() {
|
||||
return wxOfficialAccountOpenId == null ? "" : wxOfficialAccountOpenId.trim();
|
||||
}
|
||||
|
||||
public void setWxOfficialAccountOpenId(String wxOfficialAccountOpenId) {
|
||||
this.wxOfficialAccountOpenId = wxOfficialAccountOpenId;
|
||||
}
|
||||
}
|
||||
|
254
src/main/resources/application-dev.yml
Normal file
254
src/main/resources/application-dev.yml
Normal file
@ -0,0 +1,254 @@
|
||||
server:
|
||||
port: 8099
|
||||
url: http://192.168.0.15:8099/operator-plugin
|
||||
ip: 192.168.0.15
|
||||
system-title: 运营平台(扩展)
|
||||
system-sub-title: 运营平台(扩展)
|
||||
# default-home-page: route/land/page
|
||||
servlet:
|
||||
context-path: /operator-plugin
|
||||
|
||||
access-control:
|
||||
# 跳过权限
|
||||
role-permission: false
|
||||
|
||||
spring:
|
||||
login-url: /oauth/login
|
||||
login-failure: /oauth/login?error
|
||||
login-process: /userlogin
|
||||
assets-matchers: /assets/**,/route/populationinfo/**,/api/populationinfo/**
|
||||
server:
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
aop:
|
||||
# 开启自动代理功能
|
||||
auto: true
|
||||
mvc:
|
||||
pathmatch:
|
||||
# 设置路径匹配策略为Ant风格
|
||||
matching-strategy: ANT_PATH_MATCHER
|
||||
thymeleaf:
|
||||
# 设置Thymeleaf模板的前缀路径, 这里是classpath下的templates目录下
|
||||
prefix: classpath:/templates/
|
||||
content-type: text/html
|
||||
# 关闭模板缓存功能
|
||||
cache: false
|
||||
# 设置模板文件的后缀名为.html
|
||||
suffix: .html
|
||||
# 设置Thymeleaf的输出模式为HTML
|
||||
mode: HTML
|
||||
# 设置模板文件的编码为UTF-8
|
||||
encoding: UTF-8
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 1GB
|
||||
max-request-size: 1GB
|
||||
datasource:
|
||||
druid:
|
||||
url: jdbc:mysql://192.168.0.151:3306/db_system_operator_plugin?useUnicode=true&characterEncoding=utf8&characterSetResul ts=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true
|
||||
db-type: mysql
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
mapper-locations: classpath*:mybatis/mapper/**/*.xml
|
||||
username: root
|
||||
password: root
|
||||
initial-size: 2
|
||||
min-idle: 2
|
||||
max-active: 10
|
||||
# 配置获取连接等待超时的时间
|
||||
max-wait: 60000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
time-between-eviction-runs-millis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
min-evictable-idle-time-millis: 300000
|
||||
validation-query: SELECT 1 FROM DUAL
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
# 打开PSCache,并且指定每个连接上PSCache的大小
|
||||
max-pool-prepared-statement-per-connection-size: 10
|
||||
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
||||
filter:
|
||||
commons-log:
|
||||
connection-logger-name: stat,wall,log4j
|
||||
stat:
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 2000
|
||||
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||||
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
# 合并多个DruidDataSource的监控数据
|
||||
use-global-data-source-stat: true
|
||||
|
||||
copyright1:
|
||||
url: jdbc:mysql://192.168.0.151:3306/db_copyright_1?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
mapper-locations: classpath*:mybatis/mapper-copyright1/**/*.xml
|
||||
operator:
|
||||
url: jdbc:mysql://192.168.0.151:3306/db_system_operator?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
mapper-locations: classpath*:mybatis/mapper-operator/**/*.xml
|
||||
# 流程引擎
|
||||
activiti:
|
||||
# flase: 默认值。activiti在启动时,会对比数据库表中保存的版本,如果没有表或者版本不匹配,将抛出异常。
|
||||
# true: activiti会对数据库中所有表进行更新操作。如果表不存在,则自动创建。
|
||||
# create_drop: 在activiti启动时创建表,在关闭时删除表(必须手动关闭引擎,才能删除表)。
|
||||
# drop-create: 在activiti启动时删除原来的旧表,然后在创建新表(不需要手动关闭引擎)
|
||||
database-schema-update: true
|
||||
#检测历史表是否存在
|
||||
db-history-used: true
|
||||
# 记录历史等级 可配置的历史级别有none, acitivity, audit, all
|
||||
history-level: full
|
||||
# 检查流程定义
|
||||
check-process-definitions: false
|
||||
rest-api-enabled: true
|
||||
rest-api-servlet-name: activiti-swagger-document
|
||||
SpringProcessEngineConfiguration:
|
||||
activityFontName: 宋体
|
||||
labelFontName: 宋体
|
||||
dataSource: datasource
|
||||
data:
|
||||
mongodb:
|
||||
uri: mongodb://smartcity:smartcity@10.25.248.193:6011/smartcity
|
||||
redis:
|
||||
database: 6
|
||||
host: 192.168.0.156
|
||||
port: 6379
|
||||
password: 666
|
||||
timeout: 3000ms
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 8
|
||||
max-wait: 1ms
|
||||
max-idle: 8
|
||||
min-idle: 0
|
||||
kafka-local:
|
||||
topics: tableSync
|
||||
bootstrap-servers: 192.168.0.156:9093
|
||||
#bootstrap-servers: 175.24.42.217:9096
|
||||
#bootstrap-servers: 49.233.36.36:58093
|
||||
producer:
|
||||
# 写入失败时,重试次数。当leader节点失效,一个repli节点会替代成为leader节点,此时可能出现写入失败,
|
||||
# 当retris为0时,produce不会重复。retirs重发,此时repli节点完全成为leader节点,不会产生消息丢失。
|
||||
retries: 0
|
||||
#procedure要求leader在考虑完成请求之前收到的确认数,用于控制发送记录在服务端的持久化,其值可以为如下:
|
||||
#acks = 0 如果设置为零,则生产者将不会等待来自服务器的任何确认,该记录将立即添加到套接字缓冲区并视为已发送。在这种情况下,无法保证服务器已收到记录,并且重试配置将不会生效(因为客户端通常不会知道任何故障),为每条记录返回的偏移量始终设置为-1。
|
||||
#acks = 1 这意味着leader会将记录写入其本地日志,但无需等待所有副本服务器的完全确认即可做出回应,在这种情况下,如果leader在确认记录后立即失败,但在将数据复制到所有的副本服务器之前,则记录将会丢失。
|
||||
#acks = all 这意味着leader将等待完整的同步副本集以确认记录,这保证了只要至少一个同步副本服务器仍然存活,记录就不会丢失,这是最强有力的保证,这相当于acks = -1的设置。
|
||||
#可以设置的值为:all, -1, 0, 1
|
||||
acks: 1
|
||||
consumer:
|
||||
group-id: SmartCity
|
||||
# smallest和largest才有效,如果smallest重新0开始读取,如果是largest从logfile的offset读取。一般情况下我们都是设置smallest
|
||||
auto-offset-reset: earliest
|
||||
# 设置自动提交offset
|
||||
enable-auto-commit: true
|
||||
# 如果'enable.auto.commit'为true,则消费者偏移自动提交给Kafka的频率(以毫秒为单位),默认值为5000。
|
||||
auto-commit-interval: 100
|
||||
max-poll-records: 5
|
||||
|
||||
mybatis:
|
||||
config-location: classpath:mybatis/mybatis-config.xml
|
||||
mapper-locations: classpath*:mybatis/mapper/**/*.xml
|
||||
|
||||
logging:
|
||||
level:
|
||||
root: error
|
||||
cn.com.tenlion: debug
|
||||
ink.wgink: debug
|
||||
org.springframework.web.client: debug
|
||||
# 开启Spring事务管理日志
|
||||
|
||||
org.springframework.transaction: DEBUG
|
||||
|
||||
# 开启JDBC和MyBatis日志(显示SQL执行详情)
|
||||
|
||||
org.springframework.jdbc: DEBUG
|
||||
|
||||
org.mybatis.spring: DEBUG
|
||||
|
||||
# 具体Mapper包路径(替换为你的Mapper接口包名)
|
||||
|
||||
cn.com.tenlion.operator.daoother.copyright1: DEBUG
|
||||
|
||||
# 如果使用Druid数据源,可开启其日志
|
||||
|
||||
com.alibaba.druid: DEBUG
|
||||
|
||||
pattern:
|
||||
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
|
||||
swagger:
|
||||
base-package-list: ink.wgink,cn.com.tenlion
|
||||
|
||||
# 文件上传管理
|
||||
file:
|
||||
# 文件的保存路径
|
||||
upload-path: C:\Users\TS-QD1\Desktop\UploadFiles\case
|
||||
# 图片类型
|
||||
image-types: png,jpg,jpeg,gif,blob
|
||||
# 视频类型
|
||||
video-types: mp4,rmvb
|
||||
# 音频类型
|
||||
audio-types: mp3,wmv
|
||||
# 文件类型
|
||||
file-types: doc,docx,xls,xlsx,ppt,pptx,txt,zip,rar,apk,pdf
|
||||
# 同时上传最大支持数
|
||||
max-file-count: 6
|
||||
# 图片输出压缩质量,大于0,默认0.4
|
||||
image-output-quality: 0.4
|
||||
# 媒体最大时长(单位:秒)
|
||||
media-max-duration:
|
||||
# 后台
|
||||
backend:
|
||||
video: 100
|
||||
audio: 600
|
||||
# 微信
|
||||
wechat:
|
||||
video: 100
|
||||
audio: 600
|
||||
# app
|
||||
app:
|
||||
video: 100
|
||||
audio: 600
|
||||
|
||||
security:
|
||||
oauth2:
|
||||
oauth-server: http://192.168.0.15:8091/operator/
|
||||
oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url}
|
||||
client:
|
||||
client-id: 0cf040b3344f471f882fb751c15493ff
|
||||
client-secret: WnJNbUxITU0yVS8zWExPaHloWFJOdmpQbzdxK01KV0NVTFphdzFLNVBTRGxIdG9KZmEyTjJIRnI0dG1McEdEVA==
|
||||
user-authorization-uri: ${security.oauth2.oauth-server}/oauth2_client/authorize
|
||||
access-token-uri: ${security.oauth2.oauth-server}/oauth2_client/token
|
||||
grant-type: authorization_code
|
||||
resource:
|
||||
jwt:
|
||||
key-uri: ${security.oauth2.oauth-server}/oauth2_client/token_key
|
||||
token-info-uri: ${security.oauth2.oauth-server}/oauth2_client/check_token
|
||||
user-info-uri: ${security.oauth2.oauth-server}/user
|
||||
authorization:
|
||||
check-token-access: ${security.oauth2.oauth-server}/oauth2_client/token_key
|
||||
|
||||
api-path:
|
||||
user-center: http://192.168.0.15:8091/operator/
|
||||
copyright: http://192.168.0.15:7025/copyright/
|
||||
copyright-external: http://192.168.0.15:7025/copyright/
|
||||
operator-plugin: http://192.168.0.15:8099/operator-plugin/
|
||||
|
||||
# 短信验证码服务
|
||||
sms:
|
||||
active: false
|
||||
type: default
|
||||
default-sms:
|
||||
account: xd001382
|
||||
password: xd001382136
|
||||
sign: 【AIXXX平台】
|
||||
template:
|
||||
verification-code: '{sign} 您的验证码为 {content}, 有效时间为120秒,若非本人操作,请忽略。'
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user