Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fzm-joying
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
lei
fzm-joying
Commits
3b58d8ae
Commit
3b58d8ae
authored
Jul 30, 2021
by
tangtuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增生产环境配置
parent
5d88ea49
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
301 additions
and
159 deletions
+301
-159
application-dev.yml
joying-admin/src/main/resources/application-dev.yml
+17
-21
application-local.yml
joying-admin/src/main/resources/application-local.yml
+17
-21
application-prod.yml
joying-admin/src/main/resources/application-prod.yml
+84
-0
application-test.yml
joying-admin/src/main/resources/application-test.yml
+17
-21
logback-spring.xml
joying-admin/src/main/resources/logback-spring.xml
+5
-0
pom.xml
joying-common/pom.xml
+0
-5
RedissonClusterConfig.java
...ain/java/com/fzm/common/config/RedissonClusterConfig.java
+0
-18
RedissonConfig.java
...n/src/main/java/com/fzm/common/config/RedissonConfig.java
+1
-2
NftServiceImpl.java
...main/java/com/fzm/common/service/impl/NftServiceImpl.java
+1
-1
OssUtil.java
...ng-common/src/main/java/com/fzm/common/utils/OssUtil.java
+8
-7
application-dev.yml
joying-portal/src/main/resources/application-dev.yml
+17
-21
application-local.yml
joying-portal/src/main/resources/application-local.yml
+17
-21
application-prod.yml
joying-portal/src/main/resources/application-prod.yml
+95
-0
application-test.yml
joying-portal/src/main/resources/application-test.yml
+17
-21
logback-spring.xml
joying-portal/src/main/resources/logback-spring.xml
+5
-0
joying.sql
sql/joying.sql
+0
-0
No files found.
joying-admin/src/main/resources/application-dev.yml
View file @
3b58d8ae
...
...
@@ -3,33 +3,29 @@ server:
spring
:
main
:
allow-bean-definition-overriding
:
true
shardingsphere
:
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
username
:
root
password
:
Joying@123456
# 从数据源
read
:
platform
:
mysql
type
:
com.alibaba.druid.pool.DruidDataSource
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
username
:
root
password
:
Joying@123456
masterslave
:
# 读写分离配置
load-balance-algorithm-type
:
round_robin
# 最终的数据源名称
name
:
dataSource
# 主库数据源名称
master-data-source-name
:
write
# 从库数据源名称列表,多个逗号分隔
slave-data-source-names
:
read
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
:
172.16.101.135
port
:
6379
...
...
joying-admin/src/main/resources/application-local.yml
View file @
3b58d8ae
...
...
@@ -3,33 +3,29 @@ server:
spring
:
main
:
allow-bean-definition-overriding
:
true
shardingsphere
:
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
username
:
root
password
:
Joying@123456
# 从数据源
read
:
platform
:
mysql
type
:
com.alibaba.druid.pool.DruidDataSource
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
username
:
root
password
:
Joying@123456
masterslave
:
# 读写分离配置
load-balance-algorithm-type
:
round_robin
# 最终的数据源名称
name
:
dataSource
# 主库数据源名称
master-data-source-name
:
write
# 从库数据源名称列表,多个逗号分隔
slave-data-source-names
:
read
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
:
172.16.101.135
...
...
joying-admin/src/main/resources/application-prod.yml
0 → 100644
View file @
3b58d8ae
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
joying-admin/src/main/resources/application-test.yml
View file @
3b58d8ae
...
...
@@ -3,33 +3,29 @@ server:
spring
:
main
:
allow-bean-definition-overriding
:
true
shardingsphere
:
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
username
:
root
password
:
Joying@123456
# 从数据源
read
:
platform
:
mysql
type
:
com.alibaba.druid.pool.DruidDataSource
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
username
:
root
password
:
Joying@123456
masterslave
:
# 读写分离配置
load-balance-algorithm-type
:
round_robin
# 最终的数据源名称
name
:
dataSource
# 主库数据源名称
master-data-source-name
:
write
# 从库数据源名称列表,多个逗号分隔
slave-data-source-names
:
read
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
:
172.16.101.136
port
:
6379
...
...
joying-admin/src/main/resources/logback-spring.xml
View file @
3b58d8ae
...
...
@@ -58,6 +58,10 @@
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"INFO_FILE"
/>
</springProfile>
<springProfile
name=
"prod"
>
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"INFO_FILE"
/>
</springProfile>
</root>
</configuration>
\ No newline at end of file
joying-common/pom.xml
View file @
3b58d8ae
...
...
@@ -80,11 +80,6 @@
</dependency>
<dependency>
<groupId>
org.apache.shardingsphere
</groupId>
<artifactId>
sharding-jdbc-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.redisson
</groupId>
<artifactId>
redisson
</artifactId>
</dependency>
...
...
joying-common/src/main/java/com/fzm/common/config/RedissonClusterConfig.java
deleted
100644 → 0
View file @
5d88ea49
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
{
}
joying-common/src/main/java/com/fzm/common/config/Redisson
Single
Config.java
→
joying-common/src/main/java/com/fzm/common/config/RedissonConfig.java
View file @
3b58d8ae
...
...
@@ -17,9 +17,8 @@ import javax.annotation.Resource;
* 单机版redisson客户端配置
* </p>
*/
@Profile
({
"dev"
,
"local"
,
"test"
})
@Configuration
public
class
Redisson
Single
Config
{
public
class
RedissonConfig
{
@Resource
RedisProperties
redisProperties
;
...
...
joying-common/src/main/java/com/fzm/common/service/impl/NftServiceImpl.java
View file @
3b58d8ae
...
...
@@ -287,7 +287,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
throw
GlobalException
.
newException
(
ResultCode
.
DATA_ERROR
,
"没找到此类目"
);
}
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
...
...
joying-common/src/main/java/com/fzm/common/utils/OssUtil.java
View file @
3b58d8ae
...
...
@@ -187,20 +187,21 @@ public class OssUtil {
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账号。
String
accessKeyId
=
"LTAI5t
HGn7cVJdEtihTFLSeB
"
;
String
accessKeySecret
=
"
XYmfBSbLaZoblGXZwIXkbhfBD7a1eg
"
;
String
accessKeyId
=
"LTAI5t
AAXBCtnQ2ytwagazjt
"
;
String
accessKeySecret
=
"
x0T6hyJvRFLtPjZYrNo5egEc4kShlU
"
;
OSS
ossClient
=
new
OSSClientBuilder
().
build
(
endpoint
,
accessKeyId
,
accessKeySecret
);
// 创建存储空间。
String
bucket
=
"test-nft-2"
;
if
(!
ossClient
.
doesBucketExist
(
bucket
))
{
String
bucket2
=
"joying-nft"
;
if
(
ossClient
.
doesBucketExist
(
bucket2
))
{
// 设置Bucket加密。
ServerSideEncryptionByDefault
applyServerSideEncryptionByDefault
=
new
ServerSideEncryptionByDefault
(
SSEAlgorithm
.
AES256
);
ServerSideEncryptionConfiguration
sseConfig
=
new
ServerSideEncryptionConfiguration
();
sseConfig
.
setApplyServerSideEncryptionByDefault
(
applyServerSideEncryptionByDefault
);
SetBucketEncryptionRequest
request
=
new
SetBucketEncryptionRequest
(
bucket
,
sseConfig
);
SetBucketEncryptionRequest
request
=
new
SetBucketEncryptionRequest
(
bucket
2
,
sseConfig
);
ossClient
.
setBucketEncryption
(
request
);
ossClient
.
shutdown
();
}
...
...
joying-portal/src/main/resources/application-dev.yml
View file @
3b58d8ae
...
...
@@ -3,33 +3,29 @@ server:
spring
:
main
:
allow-bean-definition-overriding
:
true
shardingsphere
:
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
username
:
root
password
:
Joying@123456
# 从数据源
read
:
platform
:
mysql
type
:
com.alibaba.druid.pool.DruidDataSource
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
username
:
root
password
:
Joying@123456
masterslave
:
# 读写分离配置
load-balance-algorithm-type
:
round_robin
# 最终的数据源名称
name
:
dataSource
# 主库数据源名称
master-data-source-name
:
write
# 从库数据源名称列表,多个逗号分隔
slave-data-source-names
:
read
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
:
172.16.101.135
port
:
6379
...
...
joying-portal/src/main/resources/application-local.yml
View file @
3b58d8ae
...
...
@@ -3,33 +3,29 @@ server:
spring
:
main
:
allow-bean-definition-overriding
:
true
shardingsphere
:
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
username
:
root
password
:
Joying@123456
# 从数据源
read
:
platform
:
mysql
type
:
com.alibaba.druid.pool.DruidDataSource
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
username
:
root
password
:
Joying@123456
masterslave
:
# 读写分离配置
load-balance-algorithm-type
:
round_robin
# 最终的数据源名称
name
:
dataSource
# 主库数据源名称
master-data-source-name
:
write
# 从库数据源名称列表,多个逗号分隔
slave-data-source-names
:
read
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
:
localhost
port
:
6379
...
...
joying-portal/src/main/resources/application-prod.yml
0 → 100644
View file @
3b58d8ae
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
:
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
joying-portal/src/main/resources/application-test.yml
View file @
3b58d8ae
...
...
@@ -3,33 +3,29 @@ server:
spring
:
main
:
allow-bean-definition-overriding
:
true
shardingsphere
:
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
username
:
root
password
:
Joying@123456
# 从数据源
read
:
platform
:
mysql
type
:
com.alibaba.druid.pool.DruidDataSource
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
username
:
root
password
:
Joying@123456
masterslave
:
# 读写分离配置
load-balance-algorithm-type
:
round_robin
# 最终的数据源名称
name
:
dataSource
# 主库数据源名称
master-data-source-name
:
write
# 从库数据源名称列表,多个逗号分隔
slave-data-source-names
:
read
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
:
172.16.101.136
port
:
6379
...
...
joying-portal/src/main/resources/logback-spring.xml
View file @
3b58d8ae
...
...
@@ -58,6 +58,10 @@
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"INFO_FILE"
/>
</springProfile>
<springProfile
name=
"prod"
>
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"INFO_FILE"
/>
</springProfile>
</root>
</configuration>
\ No newline at end of file
sql/joying.sql
View file @
3b58d8ae
This diff is collapsed.
Click to expand it.
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