Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No table comments are generated (Mysql) #96

Closed
erengong opened this issue Mar 24, 2021 · 10 comments
Closed

No table comments are generated (Mysql) #96

erengong opened this issue Mar 24, 2021 · 10 comments
Labels

Comments

@erengong
Copy link

The new version of swagger annotation does not generate table annotations.

@carter-ya
Copy link
Owner

Maybe you should reset your tempalte.

image

@erengong
Copy link
Author

The problem seems to still exist, the table comment cannot be generated.
image
image
image
image

@carter-ya
Copy link
Owner

What version of mysql driver are you using?

You can try use this version mysql-connector-java-8.0.23
image

@erengong
Copy link
Author

Previously I used 8.0.22, this time I used 8.0.23, the same effect.
image

@carter-ya
Copy link
Owner

Can you provide the table schema and mysql database version?

@erengong
Copy link
Author

mysql database version: 5.6.27-log
table schema:

CREATE TABLE `t_auth_role` (
    `f_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
    `f_platform` tinyint(4) NOT NULL COMMENT '所属平台(1-平台管理/2-代理商管理/3-企业管理)',
    `f_corp_id` bigint(20) NOT NULL COMMENT '企业ID',
    `f_name` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '权限名称',
    `f_super_admin` tinyint(1) NOT NULL DEFAULT '0' COMMENT '超级管理员',
    `f_remark` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
    `f_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除(true-是/false-否)',
    `f_operator` bigint(20) NOT NULL DEFAULT '0' COMMENT '操作者ID',
    `f_create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `f_update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
    PRIMARY KEY (`f_id`),
    KEY `idx_corp_id` (`f_corp_id`)
) ENGINE = InnoDB AUTO_INCREMENT = 685 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '权限管理 - 角色表'

@erengong
Copy link
Author

I don’t think it’s a problem with the table schema, because all my tables have this problem, since the new version of the idea-plugin.
image

@carter-ya
Copy link
Owner

Maybe you should refer to this answer: Retrieve mysql table comment using DatabaseMetaData

@carter-ya
Copy link
Owner

image
image

@erengong
Copy link
Author

perfect! Just add this parameter: useInformationSchema=true.Thank you very much.
image

@carter-ya carter-ya added the good first issue Good for newcomers label Mar 24, 2021
@carter-ya carter-ya pinned this issue Mar 24, 2021
@carter-ya carter-ya changed the title No table comments are generated No table comments are generated (Mysql) Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants