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 @@
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-jdbc
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpcore
</artifactId>
<version>
4.4.10
</version>
</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 -->
<dependency>
<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;
* @author key
*/
@SpringBootApplication
@ComponentScan
(
basePackages
=
{
"com.jz.dm"
})
@MapperScan
(
"com.jz.dm.mapper"
)
//
@ComponentScan(basePackages = {"com.jz.dm"})
@MapperScan
(
"com.jz.dm.
gateway.
mapper"
)
public
class
ApiGatewayApplication
{
public
static
void
main
(
String
[]
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
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.http.*
;
import
org.apache.http.client.HttpRequestRetryHandler
;
import
org.apache.http.client.config.RequestConfig
;
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;
@Component
public
class
CheckTimestampFilter
extends
AbstractFilter
{
@Value
(
"${api.skipFilter}"
)
//
@Value("${api.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 {
// @Autowired
// private IApiWhiteService apiWhiteService;
@Value
(
"${secret_private}"
)
private
String
secretPrivate
;
//
@Value("${secret_private}")
//
private String secretPrivate;
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 {
//@Autowired
//private IApiWhiteService apiWhiteService;
@Value
(
"${api.skipFilter}"
)
//
@Value("${api.skipFilter}")
private
boolean
skipFilter
;
private
final
static
String
CHARSET
=
"UTF-8"
;
...
...
jz-dm-apigateway/src/main/resources/application-dev.yml
View file @
ed2d10da
#开发环境配置
#spring:
# #缓存会话
# redis:
# host: 120.76.132.142
# password: redis@123
# port: 6379
# timeout: 10000
# lettuce:
# pool:
# max-active: 8
# max-wait: -1ms
# min-idle: 0
# max-idle: 8
#
数据库
# 测试环境配置
server
:
port
:
8088
#contextPath: /resource
management
:
port
:
54001
health
:
mail
:
enabled
:
false
spring
:
profiles
:
test
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
password
:
I%ou$buy!ok
type
:
com.zaxxer.hikari.HikariDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
hikari
:
minimum-idle
:
20
maximum-pool-size
:
100
auto-commit
:
true
idle-timeout
:
30000
pool-name
:
MyHikariCP
max-lifetime
:
1800000
connection-timeout
:
30000
connection-test-query
:
SELECT 1
type
:
com.alibaba.druid.pool.DruidDataSource
#监控统计拦截的filters
filters
:
stat
#配置初始化大小/最小/最大
initialSize
:
1
minIdle
:
1
maxActive
:
20
#获取连接等待超时时间
maxWait
:
60000
#间隔多久进行一次检测,检测需要关闭的空闲连接
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
:
skipFilter
:
false
#是否跳过拦截器
skipIpLimit
:
true
#是否为ip列表
maxPostSize
:
1048576
#最大支持上传文件数
supplierId
:
200314008093
#供应商ID
# 代发三要素校验定时任务
validCron
:
0/1 * * * * *
skipFilter
:
false
#是否跳过拦截器
skipIpLimit
:
true
#是否为ip列表
maxPostSize
:
1048576
#最大支持上传文件数
supplierId
:
200314008093
#供应商ID
# 代发三要素校验定时任务
validCron
:
0/1 * * * * *
...
...
jz-dm-apigateway/src/main/resources/application.yml
View file @
ed2d10da
#服务端口和项目名称
server
:
port
:
8088
servlet
:
context-path
:
/
##Djasypt.encryptor.password
#jasypt:
# encryptor:
# password: btcpay.com
# 系统信息
info
:
app
:
name
:
"
@project.name@"
description
:
"
@project.description@"
version
:
"
@project.version@"
spring-boot-version
:
"
@project.parent.version@"
#日志打印
logging
:
level
:
com.netflix.discovery
:
'
OFF'
org.springframework.cloud
:
'
DEBUG'
#SPRING配置文件
spring
:
application
:
name
:
九章数据平台
aop
:
proxy-target-class
:
true
profiles
:
active
:
dev
#默认使用的配置文件
active
:
test
http
:
encoding
:
charset
:
UTF-8
jackson
:
time-zone
:
GMT+8
date-format
:
yyyy-MM-dd HH:mm:ss
default-property-inclusion
:
NON_NULL
sysProperties
:
session-timeout
:
3600
developerList
:
-
name
:
九章
value
:
#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