init project v1.0.0

This commit is contained in:
zlt
2019-01-19 15:31:26 +08:00
parent 5c1cdaa54e
commit 19fecc3b05
728 changed files with 65634 additions and 0 deletions
@@ -0,0 +1,97 @@
spring:
redis:
host: ${zlt.redis.host}
port: ${zlt.redis.port}
timeout: ${zlt.redis.timeout}
zlt:
oauth2:
token:
store:
type: resJwt
security:
ignore:
# 忽略认证的地址
httpUrls: >
/api-uaa/**,
/api-user/users-anon/**,
/login.html,
/user/login
# 配置只认证登录,登录后所有角色都能访问的url
menusPaths: /api-user/menus/current
auth:
# 配置必需认证的url
httpUrls: /api-uaa/clients/**
#是否开启url级别权限
urlEnabled: false
zuul:
ribbon-isolation-strategy: thread
ribbon:
eager-load:
enabled: true
threadPool:
useSeparateThreadPools: true
threadPoolKeyPrefix: api-gateway
#关闭重试
retryable: false
#/oauth/token需要请求头处理
sensitive-headers:
ignored-headers: Access-Control-Allow-Credentials,Access-Control-Allow-Origin,Access-Control-Allow-Methods
add-host-header: true
routes:
auth:
path: /api-uaa/**
service-id: uaa-server
strip-prefix: true
custom-sensitive-headers: true
auth-login-page:
path: /login.html
service-id: uaa-server
strip-prefix: true
custom-sensitive-headers: true
auth-login-process:
path: /user/login
service-id: uaa-server
strip-prefix: true
custom-sensitive-headers: true
auth-login-token:
path: /oauth/token
service-id: uaa-server
strip-prefix: true
custom-sensitive-headers: true
auth-login-authorize:
path: /oauth/authorize
service-id: uaa-server
strip-prefix: true
custom-sensitive-headers: true
auth-check-process:
path: /oauth/check_token
service-id: uaa-server
strip-prefix: true
custom-sensitive-headers: true
user:
path: /api-user/**
service-id: user-center
strip-prefix: true
custom-sensitive-headers: true
file:
path: /api-file/**
service-id: file-center
strip-prefix: true
log:
path: /api-log/**
service-id: log-center
strip-prefix: true
generator:
path: /api-generator/**
service-id: code-generator
strip-prefix: true
ssl-hostname-validation-enabled: false
swagger:
butler:
api-docs-path: v2/api-docs
swagger-version: 2.0
auto-generate-from-zuul-routes: true
generate-routes: auth,user,file
@@ -0,0 +1,19 @@
server:
port: 9200
undertow:
io-threads: 16
worker-threads: 256
buffer-size: 1024
direct-buffers: true
spring:
application:
name: api-gateway
cloud:
nacos:
config:
server-addr: ${zlt.nacos.server-addr}
file-extension: yml
shared-dataids: common.yml
discovery:
server-addr: ${zlt.nacos.server-addr}
@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjmgfejBXsPYynAIPczHA
eEvTDfAVaNKQudyI7VszdezbHDM1CStCIgwiMmLd7QYf1SrrmQoqxhcSRbhjE3ej
RF5qzhtx3kmepdpMrQptcsLjRkixaxCc4E2k6Us5707gGwbhoaTrRit5F2MnAdLY
C1TS3WwnO/hQfqUcAglbK8yrJ4AwAv0DAoIUSWnWqzuniV1SYbdV57uswxUssoWy
sEfPz+nv1ZLRs6Wz4eQ5Myqx2+CjWc9F8iXa2PV8Rmjms3dVbWcLUpCP18Dfzp8l
n8vF9LfYB7UaLSpfJe6FFF6+vCg4JHfo12djTUgwGjauMF3e9mmjU83KIoQS66lp
AQIDAQAB
-----END PUBLIC KEY-----