Commit ed2d10da authored by zhangc's avatar zhangc

commit

parent d5626afd
......@@ -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>
......
......@@ -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);
}
......
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;
......
......@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
@Component
public class CheckTimestampFilter extends AbstractFilter {
@Value("${api.skipFilter}")
//@Value("${api.skipFilter}")
private boolean skipFilter;
/**
......
......@@ -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;
......
......@@ -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";
......
#开发环境配置
#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:
......
#服务端口和项目名称
server:
port: 8088
servlet:
context-path: /
# 系统信息
info:
app:
name: "@project.name@"
description: "@project.description@"
version: "@project.version@"
spring-boot-version: "@project.parent.version@"
##Djasypt.encryptor.password
#jasypt:
# encryptor:
# password: btcpay.com
#日志打印
logging:
level:
com.netflix.discovery: 'OFF'
org.springframework.cloud: 'DEBUG'
#SPRING配置文件
spring:
application:
name: 九章数据平台
aop:
proxy-target-class: true
profiles:
active: dev #默认使用的配置文件
http:
encoding:
charset: UTF-8
jackson:
time-zone: GMT+8
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
active: test
sysProperties:
session-timeout: 3600
developerList:
- name: 九章
value:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment