Commit ed2d10da authored by zhangc's avatar zhangc

commit

parent d5626afd
...@@ -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>
......
...@@ -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);
} }
......
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;
......
...@@ -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;
/** /**
......
...@@ -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;
......
...@@ -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";
......
#开发环境配置 # 测试环境配置
#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:
......
#服务端口和项目名称 # 系统信息
server: info:
port: 8088 app:
servlet: name: "@project.name@"
context-path: / 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: spring:
application:
name: 九章数据平台
aop:
proxy-target-class: true
profiles: 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
#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
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