Commit a3a8196c authored by tangtuo's avatar tangtuo

Merge branch 'dev_1.0.0' into test_v1.0.0

parents 1df7a95b 0a8b76e3
...@@ -3,33 +3,29 @@ server: ...@@ -3,33 +3,29 @@ server:
spring: spring:
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
shardingsphere:
datasource: datasource:
names:
write,read
# 主数据源
write:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.101.135:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 url: jdbc:mysql://172.16.101.135:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root username: root
password: Joying@123456 password: Joying@123456
# 从数据源 platform: mysql
read:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.101.136:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 druid:
username: root initial-size: 5
password: Joying@123456 min-idle: 5
masterslave: max-active: 20
# 读写分离配置 max-wait: 60000
load-balance-algorithm-type: round_robin time-between-eviction-runs-millis: 60000
# 最终的数据源名称 min-evictable-idle-time-millis: 300000
name: dataSource validation-query: SELECT 1 FROM DUAL
# 主库数据源名称 test-while-idle: true
master-data-source-name: write test-on-borrow: false
# 从库数据源名称列表,多个逗号分隔 test-on-return: false
slave-data-source-names: read pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20
filters: stat ,wall
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat: true
redis: redis:
host: 172.16.101.135 host: 172.16.101.135
port: 6379 port: 6379
......
...@@ -3,33 +3,29 @@ server: ...@@ -3,33 +3,29 @@ server:
spring: spring:
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
shardingsphere:
datasource: datasource:
names:
write,read
# 主数据源
write:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.101.135:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 url: jdbc:mysql://172.16.101.135:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root username: root
password: Joying@123456 password: Joying@123456
# 从数据源 platform: mysql
read:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.101.136:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 druid:
username: root initial-size: 5
password: Joying@123456 min-idle: 5
masterslave: max-active: 20
# 读写分离配置 max-wait: 60000
load-balance-algorithm-type: round_robin time-between-eviction-runs-millis: 60000
# 最终的数据源名称 min-evictable-idle-time-millis: 300000
name: dataSource validation-query: SELECT 1 FROM DUAL
# 主库数据源名称 test-while-idle: true
master-data-source-name: write test-on-borrow: false
# 从库数据源名称列表,多个逗号分隔 test-on-return: false
slave-data-source-names: read pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20
filters: stat ,wall
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat: true
redis: redis:
host: 172.16.101.135 host: 172.16.101.135
......
server:
port: 8002
spring:
main:
allow-bean-definition-overriding: true
datasource:
url: jdbc:mysql://rm-uf65dutlz01018ctc33150.mysql.rds.aliyuncs.com:3306/joying?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: inmvochain
password: db$95872!com@inmvo
platform: mysql
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
druid:
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20
filters: stat ,wall
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat: true
redis:
host: r-uf65vh5nip6yjfgtcn.redis.rds.aliyuncs.com
port: 6379
password: db$95872!com@inmvo
lettuce:
pool:
# 连接池最大连接数(使用负值表示没有限制) 默认 8
max-active: 100
# 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1
max-wait: -1
# 连接池中的最大空闲连接 默认 8
max-idle: 8
# 连接池中的最小空闲连接 默认 0
min-idle: 0
cache:
# 整合SpringCache,redis作为缓存类型
type: redis
redis:
# 缓存失效时间
time-to-live: 86400000
swagger:
title: 乐映影视后台管理系统
description: 乐映影视后台管理系统RESTFUL API
version: 1.0.0
base-package: com.fzm.admin.controller
base-path: /**
enabled: false
globalOperationParameters:
- description: Authorization
modelRef: string
name: Authorization
parameterType: header
required: false
contact:
name: tangtuo
email: ttuo@33.com
chain:
para:
rpc-url: http://47.243.127.76:8901
withhold-addr: 1Ae6FfgdYJn6LLaqDoRjwga3j4TTmMq3t7
withhold-key: a4c49dcb35e0032dc8db5891dc81481943b68fc558ce93ce74d0382c1d104934
title: user.p.FilmChain
admin: 16naUoLwjNUgMhGVRmL3xTVpCso2DJp8JZ
admin-key: 8cd19e9bf39055f95e3e33cc1e08b9f9fc2e9be48a5b3a4d401e64041c97aec7
contract-name: user.evm.0xd996a3a866c577596df260844a045a068ec5accd8d71ccaa3d578c9617ec5490
contract-address: 1iDWTHZQxPES4hLveZRcwJH6AMaMfZfZZ
aliyun:
oss:
app-key: LTAI5tAAXBCtnQ2ytwagazjt
app-secret: x0T6hyJvRFLtPjZYrNo5egEc4kShlU
end-point: oss-cn-shanghai.aliyuncs.com
simple-bucket: joying-file
encrypt-bucket: joying-nft
...@@ -3,33 +3,29 @@ server: ...@@ -3,33 +3,29 @@ server:
spring: spring:
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
shardingsphere:
datasource: datasource:
names:
write,read
# 主数据源
write:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.101.135:3306/joying_test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 url: jdbc:mysql://172.16.101.135:3306/joying_test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root username: root
password: Joying@123456 password: Joying@123456
# 从数据源 platform: mysql
read:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.101.136:3306/joying_test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 druid:
username: root initial-size: 5
password: Joying@123456 min-idle: 5
masterslave: max-active: 20
# 读写分离配置 max-wait: 60000
load-balance-algorithm-type: round_robin time-between-eviction-runs-millis: 60000
# 最终的数据源名称 min-evictable-idle-time-millis: 300000
name: dataSource validation-query: SELECT 1 FROM DUAL
# 主库数据源名称 test-while-idle: true
master-data-source-name: write test-on-borrow: false
# 从库数据源名称列表,多个逗号分隔 test-on-return: false
slave-data-source-names: read pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20
filters: stat ,wall
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat: true
redis: redis:
host: 172.16.101.136 host: 172.16.101.136
port: 6379 port: 6379
......
...@@ -58,6 +58,10 @@ ...@@ -58,6 +58,10 @@
<appender-ref ref="CONSOLE"/> <appender-ref ref="CONSOLE"/>
<appender-ref ref="INFO_FILE"/> <appender-ref ref="INFO_FILE"/>
</springProfile> </springProfile>
<springProfile name="prod">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="INFO_FILE"/>
</springProfile>
</root> </root>
</configuration> </configuration>
\ No newline at end of file
...@@ -80,11 +80,6 @@ ...@@ -80,11 +80,6 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.redisson</groupId> <groupId>org.redisson</groupId>
<artifactId>redisson</artifactId> <artifactId>redisson</artifactId>
</dependency> </dependency>
......
package com.fzm.common.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
/**
* @author tangtuo
* @date 2021/7/19 10:25
* <p>
* 集群版redisson客户端配置
* </p>
*/
@Profile({"prod"})
@Configuration
public class RedissonClusterConfig {
}
...@@ -17,9 +17,8 @@ import javax.annotation.Resource; ...@@ -17,9 +17,8 @@ import javax.annotation.Resource;
* 单机版redisson客户端配置 * 单机版redisson客户端配置
* </p> * </p>
*/ */
@Profile({"dev", "local", "test"})
@Configuration @Configuration
public class RedissonSingleConfig { public class RedissonConfig {
@Resource @Resource
RedisProperties redisProperties; RedisProperties redisProperties;
......
...@@ -53,6 +53,9 @@ public class NftVo { ...@@ -53,6 +53,9 @@ public class NftVo {
@ApiModelProperty("文件地址") @ApiModelProperty("文件地址")
private String fileUrl; private String fileUrl;
@ApiModelProperty("nft哈希")
private String nftHash;
@ApiModelProperty("发行时间") @ApiModelProperty("发行时间")
private String publishTime; private String publishTime;
...@@ -96,6 +99,7 @@ public class NftVo { ...@@ -96,6 +99,7 @@ public class NftVo {
this.collection = false; this.collection = false;
this.fileName = nft.getFileName(); this.fileName = nft.getFileName();
this.fileUrl = nft.getFileUrl(); this.fileUrl = nft.getFileUrl();
this.isCommemorate= nft.getIsCommemorate(); this.isCommemorate = nft.getIsCommemorate();
this.nftHash = nft.getNftHash();
} }
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.fzm.common.entity.Nft; import com.fzm.common.entity.Nft;
import com.fzm.common.entity.NftDto; import com.fzm.common.entity.NftDto;
import com.fzm.common.entity.vo.CollectionNftVo; import com.fzm.common.entity.vo.CollectionNftVo;
import com.fzm.common.entity.vo.NftCertificateVo;
import com.fzm.common.entity.vo.NftListVo; import com.fzm.common.entity.vo.NftListVo;
import com.fzm.common.params.NftTransferParam; import com.fzm.common.params.NftTransferParam;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
...@@ -126,7 +127,7 @@ public interface NftService extends IService<Nft> { ...@@ -126,7 +127,7 @@ public interface NftService extends IService<Nft> {
* @param nftDto * @param nftDto
* @return * @return
*/ */
Boolean publish(NftDto nftDto); Integer publish(NftDto nftDto);
/** /**
* nft转让 * nft转让
......
...@@ -15,6 +15,7 @@ import com.fzm.common.constant.SystemConstant; ...@@ -15,6 +15,7 @@ import com.fzm.common.constant.SystemConstant;
import com.fzm.common.entity.*; import com.fzm.common.entity.*;
import com.fzm.common.entity.dto.ChainDto; import com.fzm.common.entity.dto.ChainDto;
import com.fzm.common.entity.vo.CollectionNftVo; import com.fzm.common.entity.vo.CollectionNftVo;
import com.fzm.common.entity.vo.NftCertificateVo;
import com.fzm.common.entity.vo.NftListVo; import com.fzm.common.entity.vo.NftListVo;
import com.fzm.common.enums.ResultCode; import com.fzm.common.enums.ResultCode;
import com.fzm.common.exception.GlobalException; import com.fzm.common.exception.GlobalException;
...@@ -99,7 +100,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe ...@@ -99,7 +100,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
} }
@Override @Override
public Boolean publish(NftDto nftDto) { public Integer publish(NftDto nftDto) {
User user = userService.getUserByToken(); User user = userService.getUserByToken();
String wallet = user.getWallet(); String wallet = user.getWallet();
// 获取用户的私钥 // 获取用户的私钥
...@@ -145,7 +146,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe ...@@ -145,7 +146,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
userService.updateById(u); userService.updateById(u);
redisUtil.delete("user::statistic"); redisUtil.delete("user::statistic");
} }
return true; return nft.getId();
} }
@Override @Override
...@@ -160,7 +161,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe ...@@ -160,7 +161,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
throw GlobalException.newException(ResultCode.TRANSFER_ERROR, "您无权转让他人的nft"); throw GlobalException.newException(ResultCode.TRANSFER_ERROR, "您无权转让他人的nft");
} }
// 校验短信验证码 // 校验短信验证码
if (!Objects.equals("8888", param.getCode()) && !smsUtil.validateCode(getCodeType(param.getCodeType()), user.getTelephone(), param.getCode(), param.getCodeType())) { if (!smsUtil.validateCode(getCodeType(param.getCodeType()), user.getTelephone(), param.getCode(), param.getCodeType())) {
throw GlobalException.newException(ResultCode.TRANSFER_ERROR, "短信验证码校验失败"); throw GlobalException.newException(ResultCode.TRANSFER_ERROR, "短信验证码校验失败");
} }
// 校验接收人的个人信息 // 校验接收人的个人信息
...@@ -287,7 +288,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe ...@@ -287,7 +288,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
throw GlobalException.newException(ResultCode.DATA_ERROR, "没找到此类目"); throw GlobalException.newException(ResultCode.DATA_ERROR, "没找到此类目");
} }
int code = RandomUtil.randomInt(1000, 10000); int code = RandomUtil.randomInt(1000, 10000);
return String.format("YIMU-%s-%s%s", category.getEnglishName(), System.currentTimeMillis(), code); return String.format("INMVO-%s-%s%s", category.getEnglishName(), System.currentTimeMillis(), code);
} }
@Override @Override
......
...@@ -187,20 +187,21 @@ public class OssUtil { ...@@ -187,20 +187,21 @@ public class OssUtil {
public static void main(String[] args) { public static void main(String[] args) {
String endpoint = "oss-cn-hangzhou.aliyuncs.com"; String endpoint = "oss-cn-shanghai.aliyuncs.com";
// 阿里云主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录RAM控制台创建RAM账号。 // 阿里云主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录RAM控制台创建RAM账号。
String accessKeyId = "LTAI5tHGn7cVJdEtihTFLSeB"; String accessKeyId = "LTAI5tAAXBCtnQ2ytwagazjt";
String accessKeySecret = "XYmfBSbLaZoblGXZwIXkbhfBD7a1eg"; String accessKeySecret = "x0T6hyJvRFLtPjZYrNo5egEc4kShlU";
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
// 创建存储空间。 String bucket2 = "joying-nft";
String bucket = "test-nft-2";
if (!ossClient.doesBucketExist(bucket)) {
if (ossClient.doesBucketExist(bucket2)) {
// 设置Bucket加密。 // 设置Bucket加密。
ServerSideEncryptionByDefault applyServerSideEncryptionByDefault = new ServerSideEncryptionByDefault(SSEAlgorithm.AES256); ServerSideEncryptionByDefault applyServerSideEncryptionByDefault = new ServerSideEncryptionByDefault(SSEAlgorithm.AES256);
ServerSideEncryptionConfiguration sseConfig = new ServerSideEncryptionConfiguration(); ServerSideEncryptionConfiguration sseConfig = new ServerSideEncryptionConfiguration();
sseConfig.setApplyServerSideEncryptionByDefault(applyServerSideEncryptionByDefault); sseConfig.setApplyServerSideEncryptionByDefault(applyServerSideEncryptionByDefault);
SetBucketEncryptionRequest request = new SetBucketEncryptionRequest(bucket, sseConfig); SetBucketEncryptionRequest request = new SetBucketEncryptionRequest(bucket2, sseConfig);
ossClient.setBucketEncryption(request); ossClient.setBucketEncryption(request);
ossClient.shutdown(); ossClient.shutdown();
} }
......
...@@ -91,10 +91,6 @@ public class SmsUtil { ...@@ -91,10 +91,6 @@ public class SmsUtil {
* @return * @return
*/ */
public Boolean validateCode(String codetype, String mobile, String code, String type) { public Boolean validateCode(String codetype, String mobile, String code, String type) {
// todo 方便测试,事后要删除
if ("8888".equals(code)) {
return true;
}
String timestamp = getTimestamp(); String timestamp = getTimestamp();
HashMap<String, Object> paramMap = new HashMap<>(); HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("t", type); paramMap.put("t", type);
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<select id="getCollectionList" resultType="com.fzm.common.entity.vo.CollectionNftVo"> <select id="getCollectionList" resultType="com.fzm.common.entity.vo.CollectionNftVo">
select a.id, select a.id,
a.name, a.name,
a.cover,
a.theme, a.theme,
a.nft_id, a.nft_id,
a.is_commemorate, a.is_commemorate,
......
...@@ -85,9 +85,9 @@ public class NftController { ...@@ -85,9 +85,9 @@ public class NftController {
@Authentication @Authentication
@PostMapping("/publish") @PostMapping("/publish")
@ApiOperation("发行nft") @ApiOperation("发行nft")
public ResponseModel<Boolean> publish(@Validated @RequestBody NftDto nftDto) { public ResponseModel<Integer> publish(@Validated @RequestBody NftDto nftDto) {
Boolean result = nftService.publish(nftDto); Integer id = nftService.publish(nftDto);
return ResponseModel.success(result); return ResponseModel.success(id);
} }
@GetMapping("/list") @GetMapping("/list")
......
...@@ -3,33 +3,29 @@ server: ...@@ -3,33 +3,29 @@ server:
spring: spring:
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
shardingsphere:
datasource: datasource:
names:
write,read
# 主数据源
write:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.101.135:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 url: jdbc:mysql://172.16.101.135:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root username: root
password: Joying@123456 password: Joying@123456
# 从数据源 platform: mysql
read:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.101.136:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 druid:
username: root initial-size: 5
password: Joying@123456 min-idle: 5
masterslave: max-active: 20
# 读写分离配置 max-wait: 60000
load-balance-algorithm-type: round_robin time-between-eviction-runs-millis: 60000
# 最终的数据源名称 min-evictable-idle-time-millis: 300000
name: dataSource validation-query: SELECT 1 FROM DUAL
# 主库数据源名称 test-while-idle: true
master-data-source-name: write test-on-borrow: false
# 从库数据源名称列表,多个逗号分隔 test-on-return: false
slave-data-source-names: read pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20
filters: stat ,wall
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat: true
redis: redis:
host: 172.16.101.135 host: 172.16.101.135
port: 6379 port: 6379
......
...@@ -3,33 +3,29 @@ server: ...@@ -3,33 +3,29 @@ server:
spring: spring:
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
shardingsphere:
datasource: datasource:
names:
write,read
# 主数据源
write:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.101.135:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 url: jdbc:mysql://172.16.101.135:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root username: root
password: Joying@123456 password: Joying@123456
# 从数据源 platform: mysql
read:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.101.136:3306/joying_dev?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 druid:
username: root initial-size: 5
password: Joying@123456 min-idle: 5
masterslave: max-active: 20
# 读写分离配置 max-wait: 60000
load-balance-algorithm-type: round_robin time-between-eviction-runs-millis: 60000
# 最终的数据源名称 min-evictable-idle-time-millis: 300000
name: dataSource validation-query: SELECT 1 FROM DUAL
# 主库数据源名称 test-while-idle: true
master-data-source-name: write test-on-borrow: false
# 从库数据源名称列表,多个逗号分隔 test-on-return: false
slave-data-source-names: read pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20
filters: stat ,wall
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat: true
redis: redis:
host: localhost host: localhost
port: 6379 port: 6379
......
server:
port: 8001
spring:
main:
allow-bean-definition-overriding: true
datasource:
url: jdbc:mysql://rm-uf65dutlz01018ctc33150.mysql.rds.aliyuncs.com:3306/joying?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: inmvochain
password: db$95872!com@inmvo
platform: mysql
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
druid:
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20
filters: stat ,wall
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat: true
redis:
host: r-uf65vh5nip6yjfgtcn.redis.rds.aliyuncs.com
port: 6379
password: db$95872!com@inmvo
lettuce:
pool:
# 连接池最大连接数(使用负值表示没有限制) 默认 8
max-active: 100
# 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1
max-wait: -1
# 连接池中的最大空闲连接 默认 8
max-idle: 8
# 连接池中的最小空闲连接 默认 0
min-idle: 0
cache:
# 整合SpringCache,redis作为缓存类型
type: redis
redis:
time-to-live: 86400000
swagger:
title: 乐映影视门户系统
description: 乐映影视门户系统RESTFUL API
version: 1.0.0
base-package: com.fzm.portal.controller
base-path: /**
enabled: false
globalOperationParameters:
- description: Authorization
modelRef: string
name: Authorization
parameterType: header
required: false
contact:
name: tangtuo
email: ttuo@33.com
sms:
app-key: Yiru
app-secret: mx5oaR^RY8!(ziHn
login-message-codetype: quick
login-email-codetype: quick
login-voice-codetype: quick
send-sms-url: http://118.31.52.32/send/sms2
validate-code-url: http://118.31.52.32/validate/code
transfer-nft-message-codetype: notice_transfer
transfer-nft-email-codetype: notice_transfer
transfer-nft-voice-codetype: notice_transfer
chain:
para:
rpc-url: http://47.243.127.76:8901
withhold-addr: 1Ae6FfgdYJn6LLaqDoRjwga3j4TTmMq3t7
withhold-key: a4c49dcb35e0032dc8db5891dc81481943b68fc558ce93ce74d0382c1d104934
title: user.p.FilmChain
admin: 1N2ABERwHgxGhebVw6fVSwaQ5uLAysmGEu
admin-key: 4e92bda2477ded0e7c07a9e3acd2370de8d7401c68cc83ee8376806db3121e77
contract-name: user.evm.0xd996a3a866c577596df260844a045a068ec5accd8d71ccaa3d578c9617ec5490
contract-address: 1iDWTHZQxPES4hLveZRcwJH6AMaMfZfZZ
aliyun:
oss:
app-key: LTAI5tAAXBCtnQ2ytwagazjt
app-secret: x0T6hyJvRFLtPjZYrNo5egEc4kShlU
end-point: oss-cn-shanghai.aliyuncs.com
simple-bucket: joying-file
encrypt-bucket: joying-nft
...@@ -3,33 +3,29 @@ server: ...@@ -3,33 +3,29 @@ server:
spring: spring:
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
shardingsphere:
datasource: datasource:
names:
write,read
# 主数据源
write:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.101.135:3306/joying_test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 url: jdbc:mysql://172.16.101.135:3306/joying_test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root username: root
password: Joying@123456 password: Joying@123456
# 从数据源 platform: mysql
read:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.101.136:3306/joying_test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8 druid:
username: root initial-size: 5
password: Joying@123456 min-idle: 5
masterslave: max-active: 20
# 读写分离配置 max-wait: 60000
load-balance-algorithm-type: round_robin time-between-eviction-runs-millis: 60000
# 最终的数据源名称 min-evictable-idle-time-millis: 300000
name: dataSource validation-query: SELECT 1 FROM DUAL
# 主库数据源名称 test-while-idle: true
master-data-source-name: write test-on-borrow: false
# 从库数据源名称列表,多个逗号分隔 test-on-return: false
slave-data-source-names: read pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20
filters: stat ,wall
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat: true
redis: redis:
host: 172.16.101.136 host: 172.16.101.136
port: 6379 port: 6379
......
...@@ -58,6 +58,10 @@ ...@@ -58,6 +58,10 @@
<appender-ref ref="CONSOLE"/> <appender-ref ref="CONSOLE"/>
<appender-ref ref="INFO_FILE"/> <appender-ref ref="INFO_FILE"/>
</springProfile> </springProfile>
<springProfile name="prod">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="INFO_FILE"/>
</springProfile>
</root> </root>
</configuration> </configuration>
\ No newline at end of file
This diff is collapsed.
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