Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
dm_project
Commits
ed2d10da
Commit
ed2d10da
authored
Dec 01, 2020
by
zhangc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
d5626afd
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
106 additions
and
89 deletions
+106
-89
pom.xml
jz-dm-apigateway/pom.xml
+12
-3
ApiGatewayApplication.java
...rc/main/java/com/jz/dm/gateway/ApiGatewayApplication.java
+2
-3
WebUtils.java
...src/main/java/com/jz/dm/gateway/common/util/WebUtils.java
+1
-0
CheckTimestampFilter.java
...n/java/com/jz/dm/gateway/filter/CheckTimestampFilter.java
+1
-1
SignatureFilter.java
...c/main/java/com/jz/dm/gateway/filter/SignatureFilter.java
+2
-2
VerifySignFilter.java
.../main/java/com/jz/dm/gateway/filter/VerifySignFilter.java
+1
-1
application-dev.yml
jz-dm-apigateway/src/main/resources/application-dev.yml
+74
-34
application.yml
jz-dm-apigateway/src/main/resources/application.yml
+13
-45
No files found.
jz-dm-apigateway/pom.xml
View file @
ed2d10da
...
@@ -51,15 +51,24 @@
...
@@ -51,15 +51,24 @@
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
mysql
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<artifactId>
spring-boot-starter-jdbc
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpcore
</artifactId>
<artifactId>
httpcore
</artifactId>
<version>
4.4.10
</version>
<version>
4.4.10
</version>
</dependency>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
6.0.6
</version>
</dependency>
<dependency>
<groupId>
com.zaxxer
</groupId>
<artifactId>
HikariCP
</artifactId>
<version>
3.1.0
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<groupId>
org.apache.httpcomponents
</groupId>
...
...
jz-dm-apigateway/src/main/java/com/jz/dm/gateway/ApiGatewayApplication.java
View file @
ed2d10da
...
@@ -9,12 +9,11 @@ import org.springframework.context.annotation.ComponentScan;
...
@@ -9,12 +9,11 @@ import org.springframework.context.annotation.ComponentScan;
* @author key
* @author key
*/
*/
@SpringBootApplication
@SpringBootApplication
@ComponentScan
(
basePackages
=
{
"com.jz.dm"
})
//
@ComponentScan(basePackages = {"com.jz.dm"})
@MapperScan
(
"com.jz.dm.mapper"
)
@MapperScan
(
"com.jz.dm.
gateway.
mapper"
)
public
class
ApiGatewayApplication
{
public
class
ApiGatewayApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ApiGatewayApplication
.
class
,
args
);
SpringApplication
.
run
(
ApiGatewayApplication
.
class
,
args
);
}
}
...
...
jz-dm-apigateway/src/main/java/com/jz/dm/gateway/common/util/WebUtils.java
View file @
ed2d10da
package
com
.
jz
.
dm
.
gateway
.
common
.
util
;
package
com
.
jz
.
dm
.
gateway
.
common
.
util
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.http.*
;
import
org.apache.http.client.HttpRequestRetryHandler
;
import
org.apache.http.client.HttpRequestRetryHandler
;
import
org.apache.http.client.config.RequestConfig
;
import
org.apache.http.client.config.RequestConfig
;
import
org.apache.http.client.entity.UrlEncodedFormEntity
;
import
org.apache.http.client.entity.UrlEncodedFormEntity
;
...
...
jz-dm-apigateway/src/main/java/com/jz/dm/gateway/filter/CheckTimestampFilter.java
View file @
ed2d10da
...
@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
...
@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
@Component
@Component
public
class
CheckTimestampFilter
extends
AbstractFilter
{
public
class
CheckTimestampFilter
extends
AbstractFilter
{
@Value
(
"${api.skipFilter}"
)
//
@Value("${api.skipFilter}")
private
boolean
skipFilter
;
private
boolean
skipFilter
;
/**
/**
...
...
jz-dm-apigateway/src/main/java/com/jz/dm/gateway/filter/SignatureFilter.java
View file @
ed2d10da
...
@@ -28,8 +28,8 @@ public class SignatureFilter extends AbstractFilter {
...
@@ -28,8 +28,8 @@ public class SignatureFilter extends AbstractFilter {
// @Autowired
// @Autowired
// private IApiWhiteService apiWhiteService;
// private IApiWhiteService apiWhiteService;
@Value
(
"${secret_private}"
)
//
@Value("${secret_private}")
private
String
secretPrivate
;
//
private String secretPrivate;
private
String
encryptData
;
private
String
encryptData
;
...
...
jz-dm-apigateway/src/main/java/com/jz/dm/gateway/filter/VerifySignFilter.java
View file @
ed2d10da
...
@@ -20,7 +20,7 @@ public class VerifySignFilter extends AbstractFilter {
...
@@ -20,7 +20,7 @@ public class VerifySignFilter extends AbstractFilter {
//@Autowired
//@Autowired
//private IApiWhiteService apiWhiteService;
//private IApiWhiteService apiWhiteService;
@Value
(
"${api.skipFilter}"
)
//
@Value("${api.skipFilter}")
private
boolean
skipFilter
;
private
boolean
skipFilter
;
private
final
static
String
CHARSET
=
"UTF-8"
;
private
final
static
String
CHARSET
=
"UTF-8"
;
...
...
jz-dm-apigateway/src/main/resources/application-dev.yml
View file @
ed2d10da
#开发环境配置
# 测试环境配置
#spring:
server
:
# #缓存会话
port
:
8088
# redis:
#contextPath: /resource
# host: 120.76.132.142
# password: redis@123
management
:
# port: 6379
port
:
54001
# timeout: 10000
health
:
# lettuce:
mail
:
# pool:
enabled
:
false
# max-active: 8
# max-wait: -1ms
spring
:
# min-idle: 0
profiles
:
test
# max-idle: 8
#
数据库
datasource
:
datasource
:
url
:
jdbc:mysql://rm-wz9n399q2avsy3k6m4o.mysql.rds.aliyuncs.com/wj-mkt-project?serverTimezone=GMT%2B8&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false
url
:
jdbc:mysql://rm-wz9n399q2avsy3k6m4o.mysql.rds.aliyuncs.com:3306/wj-mkt-project?characterEncoding=utf8&useSSL=false
driverClassName
:
com.mysql.jdbc.Driver
username
:
root
username
:
root
password
:
I%ou$buy!ok
password
:
I%ou$buy!ok
type
:
com.zaxxer.hikari.HikariDataSource
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
#监控统计拦截的filters
hikari
:
filters
:
stat
minimum-idle
:
20
#配置初始化大小/最小/最大
maximum-pool-size
:
100
initialSize
:
1
auto-commit
:
true
minIdle
:
1
idle-timeout
:
30000
maxActive
:
20
pool-name
:
MyHikariCP
#获取连接等待超时时间
max-lifetime
:
1800000
maxWait
:
60000
connection-timeout
:
30000
#间隔多久进行一次检测,检测需要关闭的空闲连接
connection-test-query
:
SELECT 1
timeBetweenEvictionRunsMillis
:
60000
#一个连接在池中最小生存的时间
minEvictableIdleTimeMillis
:
300000
validationQuery
:
SELECT 'x'
testWhileIdle
:
true
testOnBorrow
:
false
testOnReturn
:
false
#打开PSCache,并指定每个连接上PSCache的大小。
#oracle设为true,mysql设为false。分库分表较多推荐设置为false
poolPreparedStatements
:
false
maxPoolPreparedStatementPerConnectionSize
:
20
cache
:
type
:
CAFFEINE
caffeine
:
spec
:
maximumSize=1000,expireAfterWrite=30s
public-key
:
rajZdV0xpCox+2vEHFLsKq2o2XVdMaQq
redis
:
#database: 0
#host: 119.23.13.83
#port: 8007
#timeout: 5000
cluster
:
nodes
:
-
192.168.31.167:6379
-
192.168.31.167:6380
-
192.168.31.167:6381
-
192.168.31.167:6382
-
192.168.31.167:6383
-
192.168.31.167:6384
#使用redis管理session设置为redis,否则none
session
:
store-type
:
none
#mybatis的配置
mybatis
:
#配置mapper.xml文件所在路径
mapper-locations
:
classpath:mapper.*/*.xml
#配置映射类所在的包名
type-aliases-package
:
com.jz.manage.moduls.entity
logging
:
level
:
com.jz.manage
:
debug
# 跳过签名
# 跳过签名
api
:
api
:
skipFilter
:
false
#是否跳过拦截器
skipFilter
:
false
#是否跳过拦截器
skipIpLimit
:
true
#是否为ip列表
skipIpLimit
:
true
#是否为ip列表
maxPostSize
:
1048576
#最大支持上传文件数
maxPostSize
:
1048576
#最大支持上传文件数
supplierId
:
200314008093
#供应商ID
supplierId
:
200314008093
#供应商ID
# 代发三要素校验定时任务
# 代发三要素校验定时任务
validCron
:
0/1 * * * * *
validCron
:
0/1 * * * * *
...
...
jz-dm-apigateway/src/main/resources/application.yml
View file @
ed2d10da
#服务端口和项目名称
# 系统信息
server
:
info
:
port
:
8088
app
:
servlet
:
name
:
"
@project.name@"
context-path
:
/
description
:
"
@project.description@"
version
:
"
@project.version@"
##Djasypt.encryptor.password
spring-boot-version
:
"
@project.parent.version@"
#jasypt:
# encryptor:
# password: btcpay.com
#日志打印
logging
:
level
:
com.netflix.discovery
:
'
OFF'
org.springframework.cloud
:
'
DEBUG'
#SPRING配置文件
spring
:
spring
:
application
:
name
:
九章数据平台
aop
:
proxy-target-class
:
true
profiles
:
profiles
:
active
:
dev
#默认使用的配置文件
active
:
test
http
:
sysProperties
:
encoding
:
session-timeout
:
3600
charset
:
UTF-8
developerList
:
jackson
:
-
name
:
九章
time-zone
:
GMT+8
value
:
date-format
:
yyyy-MM-dd HH:mm:ss
default-property-inclusion
:
NON_NULL
#MyBatis
mybatis-plus
:
mapper-locations
:
classpath:/mapper/**/*.xml
# typeAliasesPackage: com.btcpay.account.domain;com.btcpay.shopping.domain;com.btcpay.order.domain;com.btcpay.merchant.domain;com.btcpay.system.domain
# type-handlers-package: com.btcpay.commons.typehandler
global-config
:
id-type
:
1
field-strategy
:
2
db-column-underline
:
true
refresh-mapper
:
true
configuration
:
map-underscore-to-camel-case
:
true
cache-enabled
:
false
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment