第二章 使用mybatis + spring boot 连接MySQL 数据库
1.本地新建MySQL数据库:
数据库名称:mysql_test
数据库添加表:user
CREATE TABLE `user` (
`user_id` int(0) NOT NULL AUTO_INCREMENT COMMENT '用户编码',
`user_account` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户账号',
`user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户姓名',
`user_password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户密码',
`enabled` tinyint(1) NULL DEFAULT 1 COMMENT '是否可用 0否 1是',
`user_duty` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属岗位',
`phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号',
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电子邮箱',
`organ_id` int(0) NULL DEFAULT NULL COMMENT '部门id',
`create_person` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`create_time` datetime(0) NULL DEFAULT NULL,
`user_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户描述',
`update_time` datetime(0) NULL DEFAULT NULL,
`update_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`redmine_id` varchar(20) CHARACTER