Skip to content

Commit

Permalink
perf($ORM): migrate Redis library to spring-boot-starter
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnny Miller (锺俊) committed Jan 14, 2021
1 parent 0e66476 commit 7af0ccc
Show file tree
Hide file tree
Showing 37 changed files with 219 additions and 124 deletions.
10 changes: 0 additions & 10 deletions auth-center/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,6 @@
<artifactId>spring-boot-starter</artifactId>
</dependency>

<!-- Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-sftp</artifactId>
Expand Down

This file was deleted.

12 changes: 2 additions & 10 deletions auth-center/src/main/resources/application-development-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://maf.open-zipkin.dev:9411
devtools:
add-properties: true
datasource:
url: jdbc:mysql://maf.mysql.dev:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
redis:
database: 0
host: maf.redis.dev
port: 6379
password: 123456
timeout: 10000ms
lettuce:
pool:
max-active: 20
max-idle: 10
max-wait: -1ms
min-idle: 0
devtools:
add-properties: true

sftp:
client:
Expand Down
12 changes: 2 additions & 10 deletions auth-center/src/main/resources/application-development-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://localhost:9411
devtools:
add-properties: true
datasource:
url: jdbc:mysql://localhost:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
redis:
database: 0
host: localhost
port: 6379
password: 123456
timeout: 10000ms
lettuce:
pool:
max-active: 20
max-idle: 10
max-wait: -1ms
min-idle: 0
devtools:
add-properties: true

logging:
# Configure logging level for SFTP/JSCH
Expand Down
12 changes: 2 additions & 10 deletions auth-center/src/main/resources/application-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://maf.open-zipkin.production:9411
devtools:
add-properties: false
datasource:
url: jdbc:mysql://maf.mysql.production:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
redis:
database: 0
host: maf.redis.production
port: 6379
password: 123456
timeout: 10000ms
lettuce:
pool:
max-active: 20
max-idle: 10
max-wait: -1ms
min-idle: 0
devtools:
add-properties: false

sftp:
client:
Expand Down
12 changes: 2 additions & 10 deletions auth-center/src/main/resources/application-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://maf.open-zipkin.stage:9411
devtools:
add-properties: false
datasource:
url: jdbc:mysql://maf.mysql.stage:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
redis:
database: 0
host: maf.redis.stage
port: 6379
password: 123456
timeout: 10000ms
lettuce:
pool:
max-active: 20
max-idle: 10
max-wait: -1ms
min-idle: 0
devtools:
add-properties: false

sftp:
client:
Expand Down
12 changes: 2 additions & 10 deletions auth-center/src/main/resources/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://maf.open-zipkin.test:9411
devtools:
add-properties: false
datasource:
url: jdbc:mysql://maf.mysql.test:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
redis:
database: 0
host: maf.redis.test
port: 6379
password: 123456
timeout: 10000ms
lettuce:
pool:
max-active: 20
max-idle: 10
max-wait: -1ms
min-idle: 0
devtools:
add-properties: false

sftp:
client:
Expand Down
9 changes: 9 additions & 0 deletions auth-center/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ spring:
name: muscle_and_fitness
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
redis:
database: 0
timeout: 10000ms
lettuce:
pool:
max-active: 20
max-idle: 10
max-wait: -1ms
min-idle: 0

eureka:
instance:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void logicDeleteTest() {
val rolePersistence2 = roleMapper.selectByName(rolePersistence.getName());
log.info("Deleted role: {}", rolePersistence2);
Assertions.assertEquals(rolePersistence2.getDeleted(), DeleteFlag.DELETED.getValue());
roleMapper.selectByName("role-for-mybatis-plus-tests");
log.warn("Role not found! {}", lambdaQuery.getEntity());
final var deletedRolePersistence = roleService.getOne(lambdaQuery);
Assertions.assertNull(deletedRolePersistence);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://maf.open-zipkin.dev:9411
devtools:
add-properties: true
datasource:
url: jdbc:mysql://maf.mysql.dev:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
devtools:
add-properties: true
redis:
host: maf.redis.dev
port: 6379
password: 123456

maf:
configuration:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://localhost:9411
devtools:
add-properties: true
datasource:
url: jdbc:mysql://localhost:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
devtools:
add-properties: true
redis:
host: localhost
port: 6379
password: 123456

maf:
configuration:
Expand Down
8 changes: 6 additions & 2 deletions exercise-mis/src/main/resources/application-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://maf.open-zipkin.production:9411
devtools:
add-properties: false
datasource:
url: jdbc:mysql://maf.mysql.production:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
devtools:
add-properties: false
redis:
host: maf.redis.production
port: 6379
password: 123456

maf:
configuration:
Expand Down
8 changes: 6 additions & 2 deletions exercise-mis/src/main/resources/application-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://maf.open-zipkin.stage:9411
devtools:
add-properties: false
datasource:
url: jdbc:mysql://maf.mysql.stage:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
devtools:
add-properties: false
redis:
host: maf.redis.stage
port: 6379
password: 123456

maf:
configuration:
Expand Down
8 changes: 6 additions & 2 deletions exercise-mis/src/main/resources/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://maf.open-zipkin.test:9411
devtools:
add-properties: false
datasource:
url: jdbc:mysql://maf.mysql.test:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
devtools:
add-properties: false
redis:
host: maf.redis.test
port: 6379
password: 123456

maf:
configuration:
Expand Down
9 changes: 9 additions & 0 deletions exercise-mis/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ spring:
name: muscle_and_fitness
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
redis:
database: 0
timeout: 10000ms
lettuce:
pool:
max-active: 20
max-idle: 10
max-wait: -1ms
min-idle: 0

eureka:
instance:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://maf.open-zipkin.dev:9411
devtools:
add-properties: true
datasource:
url: jdbc:mysql://maf.mysql.dev:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
devtools:
add-properties: true
redis:
host: maf.redis.dev
port: 6379
password: 123456

maf:
configuration:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://localhost:9411
devtools:
add-properties: true
datasource:
url: jdbc:mysql://localhost:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
devtools:
add-properties: true
redis:
host: localhost
port: 6379
password: 123456

logging:
level:
Expand Down
8 changes: 6 additions & 2 deletions muscle-mis/src/main/resources/application-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://maf.open-zipkin.production:9411
devtools:
add-properties: false
datasource:
url: jdbc:mysql://maf.mysql.production:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
devtools:
add-properties: false
redis:
host: maf.redis.production
port: 6379
password: 123456

maf:
configuration:
Expand Down
8 changes: 6 additions & 2 deletions muscle-mis/src/main/resources/application-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ eureka:
spring:
zipkin:
base-url: http://maf.open-zipkin.stage:9411
devtools:
add-properties: false
datasource:
url: jdbc:mysql://maf.mysql.stage:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
devtools:
add-properties: false
redis:
host: maf.redis.stage
port: 6379
password: 123456

maf:
configuration:
Expand Down
Loading

0 comments on commit 7af0ccc

Please sign in to comment.