https://github.com/chenshun00/example-demo

install DB

  • install docker
  • docker pull chenshun00/mysqlutf8:0.0.1
    • more information @see mysql:5.7
  • start docker
  1. create database test;
  2. CREATE TABLE `book` (
  3. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  4. `author` varchar(16) NOT NULL DEFAULT '''''' COMMENT '作者',
  5. `publish_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  6. `name` varchar(12) NOT NULL DEFAULT '',
  7. PRIMARY KEY (`id`)
  8. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
  9. INSERT INTO `book` (`id`, `author`, `publish_date`, `name`)
  10. VALUES
  11. (1, 'cc', '2022-04-27 03:37:26', 'first book'),
  12. (2, 'cc', '2022-04-27 03:37:29', 'second book');

spring-datasource-boot-starter

  1. cd path
  2. git clone https://github.com/chenshun00/datasource-starter.git
  3. cd datasource-starter && mvn install

install consul