环境准备

  • JDK 1.8+

  • Maven 3.2.x

  • Git

代码拉取

  1. > git clone https://github.com/yu199195/hmily.git
  2. > cd hmily
  3. > mvn -DskipTests clean install -U

执行demo 模块的sql语句。

[sql语句] (https://github.com/yu199195/hmily/blob/master/hmily-demo/sql/hmily-demo.sql)

使用你的工具 idea 或者eclipse 打开项目。

  • 修改业务数据库
  1. spring:
  2. datasource:
  3. driver-class-name: com.mysql.jdbc.Driver
  4. url: jdbc:mysql://192.168.1.68:3306/tcc_account?useUnicode=true&characterEncoding=utf8
  5. username: xiaoyu
  6. password: Wgj@555888
  • 修改事务日志数据库 (account项目为列子)
  1. org:
  2. dromara:
  3. hmily :
  4. serializer : kryo
  5. recoverDelayTime : 128
  6. retryMax : 30
  7. scheduledDelay : 128
  8. scheduledThreadMax : 10
  9. repositorySupport : db
  10. started: false
  11. hmilyDbConfig :
  12. driverClassName : com.mysql.jdbc.Driver
  13. url : jdbc:mysql://192.168.1.98:3306/tcc?useUnicode=true&characterEncoding=utf8
  14. username : root
  15. password : 123456
  • run EurekaServerApplication.java
  • run SpringCloudHmilyAccountApplication.java
  • run SpringCloudHmilyInventoryApplication.java
  • run SpringCloudHmilyOrderApplication.java