当前使用版本(必填,否则不予处理)

3.5.3

该问题是如何引起的?(确定最新版也有问题再提!!!)

代码生成器,生成代码,使用springdoc生成文档,表注释拿不到数据。

MyBatis-Plus 代码生成器无法获取到h2数据库的表注释

Comment From: huayanYu

h2版本, 示例建表sql提供

Comment From: jiangqiang1996

h2版本, 示例建表sql提供

create table "public"."admin_menu"
(
    "id"          bigint(64) auto_increment primary key comment '主键',
    "icon"        character varying(255) comment '菜单图标',
    "is_hide"     boolean comment '是否隐藏',
    "menu_type"   character varying(255) comment '菜单类型,(dir,router,link)',
    "meta"        character large object(max) comment '额外菜单数据',
    "parent_id"   bigint(64) default 0 comment '父菜单ID,顶级菜单为0',
    "sort"        integer(32) comment '排序号',
    "title"       character varying(255) comment '菜单名称',
    "create_user" bigint(64) comment '创建人',
    "update_user" bigint(64) comment '最近修改人',
    "create_time" timestamp(6) not null comment '创建时间',
    "update_time" timestamp(6) not null comment '最近时间'
);
comment on table "public"."admin_menu" is '后台菜单';

create table "public"."admin_user"
(
    "id"          bigint(64) auto_increment primary key comment '主键',
    "avatar"      character varying(255) comment '用户头像',
    "email"       character varying(255) comment '用户邮箱',
    "gender"      tinyint(8) comment '用户性别',
    "mobile"      character varying(32) comment '用户手机号',
    "nickname"    character varying(255) comment '用户昵称',
    "password"    character varying(255) not null comment '用户密码',
    "real_name"   character varying(255) comment '用户真实名字',
    "resume"      character varying(65535) comment '用户简介',
    "username"    character varying(255) not null unique comment '用户账户',
    "create_user" bigint(64) comment '创建人',
    "update_user" bigint(64) comment '最近修改人',
    "create_time" timestamp(6)           not null comment '创建时间',
    "update_time" timestamp(6)           not null comment '最近时间'
);
comment on table "public"."admin_user" is '后台用户';

create table "public"."blog_article"
(
    "id"               bigint(64) auto_increment primary key comment '主键',
    "abstract_content" character large object(max) comment '文章概要',
    "alias"            character varying(255) not null unique comment '文章别名,用作访问链接',
    "cover_url"        character varying(255) comment '文章封面',
    "html_content"     character large object(max) comment '文章html内容',
    "ori_content"      character large object(max) comment '文章原始内容,markdown格式',
    "metadata"         character large object(max) comment '文章额外配置',
    "publish_time"     timestamp(6) comment '文章发布时间',
    "sort"             integer(32) comment '文章排序',
    "status"           tinyint(8)             not null comment '文章状态',
    "title"            character varying(255) comment '文章标题',
    "create_user"      bigint(64) comment '创建人',
    "update_user"      bigint(64) comment '最近修改人',
    "create_time"      timestamp(6)           not null comment '创建时间',
    "update_time"      timestamp(6)           not null comment '最近时间'
);
comment on table "public"."blog_article" is '博客文章';

create table "public"."blog_article_category"
(
    "id"          bigint(64) auto_increment primary key comment '主键',
    "category_id" bigint(64)   not null comment '分类id',
    "article_id"  bigint(64)   not null comment '文章id',
    "create_user" bigint(64) comment '创建人',
    "update_user" bigint(64) comment '最近修改人',
    "create_time" timestamp(6) not null comment '创建时间',
    "update_time" timestamp(6) not null comment '最近时间'
);
comment on table "public"."blog_article_category" is '文章分类关联';

create table "public"."blog_article_tag"
(
    "id"          bigint(64) auto_increment primary key comment '主键',
    "article_id"  bigint(64)   not null comment '文章id',
    "tag_id"      bigint(64)   not null comment '标签id',
    "create_user" bigint(64) comment '创建人',
    "update_user" bigint(64) comment '最近修改人',
    "create_time" timestamp(6) not null comment '创建时间',
    "update_time" timestamp(6) not null comment '最近时间'
);
comment on table "public"."blog_article_tag" is '文章标签关联';

create table "public"."blog_category"
(
    "id"          bigint(64) auto_increment primary key comment '主键',
    "name"        character varying(255) not null unique comment '分类名',
    "alias"       character varying(255) not null unique comment '分类别名,用作访问路径',
    "create_user" bigint(64) comment '创建人',
    "update_user" bigint(64) comment '最近修改人',
    "create_time" timestamp(6)           not null comment '创建时间',
    "update_time" timestamp(6)           not null comment '最近时间'
);
comment on table "public"."blog_category" is '博客分类';

create table "public"."blog_tag"
(
    "id"          bigint(64) auto_increment primary key comment '主键',
    "name"        character varying(255) not null unique comment '标签名',
    "alias"       character varying(255) not null unique comment '标签别名,用作访问路径',
    "create_user" bigint(64) comment '创建人',
    "update_user" bigint(64) comment '最近修改人',
    "create_time" timestamp(6)           not null comment '创建时间',
    "update_time" timestamp(6)           not null comment '最近时间'
);
comment on table "public"."blog_tag" is '博客标签';

create table "public"."blog_menu"
(
    "id"          bigint(64) auto_increment primary key comment '主键',
    "active"      boolean comment '是否激活',
    "link"        character varying(255) comment '外链地址',
    "name"        character varying(255) comment '菜单名',
    "open_style"  tinyint(8) comment '打开方式',
    "parent_id"   bigint(64) comment '父级菜单id',
    "related_id"  bigint(64) comment '关联id',
    "sort"        integer(32) comment '菜单排序',
    "type"        tinyint(8) comment '菜单类型',
    "create_user" bigint(64) comment '创建人',
    "update_user" bigint(64) comment '最近修改人',
    "create_time" timestamp(6) not null comment '创建时间',
    "update_time" timestamp(6) not null comment '最近时间'
);
comment on table "public"."blog_menu" is '博客菜单';

create table "public"."blog_page"
(
    "id"           bigint(64) auto_increment primary key comment '主键',
    "name"         character varying(255) comment '页面名字',
    "template_url" character varying(255) comment '页面模板',
    "create_user"  bigint(64) comment '创建人',
    "update_user"  bigint(64) comment '最近修改人',
    "create_time"  timestamp(6) not null comment '创建时间',
    "update_time"  timestamp(6) not null comment '最近时间'
);
comment on table "public"."blog_page" is '博客自定义页面';

create table "public"."blog_theme"
(
    "id"          bigint(64) auto_increment primary key comment '主键',
    "metadata"    character large object(max) comment '主题额外信息',
    "theme"       character varying(255) comment '主题名字',
    "version"     character varying(255) comment '主题版本',
    "create_user" bigint(64) comment '创建人',
    "update_user" bigint(64) comment '最近修改人',
    "create_time" timestamp(6) not null comment '创建时间',
    "update_time" timestamp(6) not null comment '最近时间'
);
comment on table "public"."blog_theme" is '博客主题';

create table "public"."global_config"
(
    "id"          bigint(64) auto_increment primary key comment '主键',
    "code"        character varying(255) not null unique comment '全局配置码',
    "config"      character large object(max) comment '配置内容',
    "create_user" bigint(64) comment '创建人',
    "update_user" bigint(64) comment '最近修改人',
    "create_time" timestamp(6)           not null comment '创建时间',
    "update_time" timestamp(6)           not null comment '最近时间'
);
comment on table "public"."global_config" is '全局配置';

create table "public"."sys_dict"
(
    "id"          bigint(64) auto_increment primary key comment '主键',
    "dict_group"  integer(32)                 not null comment '字典分组',
    "dict_name"   character varying(255)      not null comment '字典名',
    "dict_code"   character varying(255)      not null comment '字典名别名',
    "dict_data"   character large object(max) not null comment '字典内容',
    "create_user" bigint(64) comment '创建人',
    "update_user" bigint(64) comment '最近修改人',
    "create_time" timestamp(6)                not null comment '创建时间',
    "update_time" timestamp(6)                not null comment '最近时间'
);
comment on table "public"."sys_dict" is '字典';

create table "public"."sys_file"
(
    "id"           bigint(64) auto_increment primary key comment '主键',
    "file_key"     character varying(255) not null unique comment '文件全局唯一key',
    "name"         character varying(255) not null comment '文件名',
    "size"         bigint(64)             not null comment '文件大小',
    "storage_code" character varying(255) not null comment '存储器编号',
    "type"         character varying(255) not null comment '文件MIME类型',
    "create_user"  bigint(64) comment '创建人',
    "update_user"  bigint(64) comment '最近修改人',
    "create_time"  timestamp(6)           not null comment '创建时间',
    "update_time"  timestamp(6)           not null comment '最近时间'
);
comment on table "public"."sys_file" is '文件';

create table "public"."sys_storage"
(
    "id"          bigint(64) auto_increment primary key comment '主键',
    "code"        character varying(255)      not null unique comment '存储器编号',
    "config"      character large object(max) not null comment '存储器配置',
    "create_user" bigint(64) comment '创建人',
    "update_user" bigint(64) comment '最近修改人',
    "create_time" timestamp(6)                not null comment '创建时间',
    "update_time" timestamp(6)                not null comment '最近时间'
);
comment on table "public"."sys_storage" is '存储器';

Comment From: huayanYu

版本呢????

Comment From: jiangqiang1996

版本呢????

3.5.3 最新版本啊 springboot3 jdk17 h2的版本也是springboot3默认管理的版本。

Comment From: lvguangzeng

mybatis-plus-generator:3.5.3 springboot:2.7.6 mysql:8.0 jdk:8 生成的没有注释 @Schema(name = "正确的表名", description = "$!{table.comment}")

Comment From: lanjerry

mybatis-plus-generator:3.5.3 springboot:2.7.6 mysql:8.0 jdk:8 生成的没有注释 @Schema(name = "正确的表名", description = "$!{table.comment}")

试试 Mysql无法读取表注释: 链接增加属性 remarks=true&useInformationSchema=true

Comment From: Dragns

sqlserver怎么设置,获取不到字段注释?