Skip to content

tallate/tidp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tidp

调试

  1. 初始化中间件 使用init目录下的run_mysql.shrun_redis.sh启动中间件(需要先安装Docker)。 如果是 MySQL,需要用init_db.sql初始化数据库。
  2. 初始化配置 tidp-test中有一些测试代码。
  • 如果是 MySQL,在resources/properties/mysql.properties中设置配置项。
  • 如果是 Redis,在resources/properties/redis.properties中设置配置项。
  1. 启动 因为测试代码是基于SpringBoot的,如果要使用一个中间件的客户端,只需要将对应的 starter 包作为依赖引入即可。
<!--如果测试MySQL,放开这里-->
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>

<!--如果测试Redis,放开这里-->
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>

SpringBoot 实际上是将配置转移到了离代码更近的地方,比如测试 MySQL 时可以使用TestMySQLIdpApplication启动,而测试 Redis 时可以使用TestRedisIdpApplication

  1. 测试 tidp-testtest目录下是一些简单的测试用例。

About

Idempotent(幂等性校验)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages