1、介绍
2、创建数据库和表
CREATE DATABASE /*!40100 DEFAULT CHARACTER SET utf8mb4 */; use ; CREATE TABLE product ( id BIGINT(20) NOT NULL COMMENT , name VARCHAR(30) NULL DEFAULT NULL COMMENT , price INT(11) DEFAULT COMMENT , version INT(11) DEFAULT COMMENT , PRIMARY KEY (id) ); INSERT INTO product (id, NAME, price) VALUES (1, , );
3、引入依赖
<dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> <version>3.5.0</version> </dependency>