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

3.3.1.tmp

该问题是怎么引起的?(最新版上已修复的会直接close掉)

在运行main方法,输入表名时,按回车会报错,由于数据库使用的是sqlserver数据库,会提示[Err] 42S22 - [SQL Server]列名 'TABLE_NAME' 无效。

重现步骤

配置好后,运行main方法,输入sqlserver中已经创建好的表名,调试到ConfigBuilder.class中的getTablesInfo()时,发现没有添加对sqlserver的支持,执行的语句在navicat中运行会提示列名 'TABLE_NAME' 无效。

报错信息

com.microsoft.sqlserver.jdbc.SQLServerException: 列名 'TABLE_NAME' 无效。 at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:259) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1547) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:548) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:479) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7344) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2713) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:224) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:204) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:401) at com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder.getTablesInfo(ConfigBuilder.java:481) at com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder.handlerStrategy(ConfigBuilder.java:291) at com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder.(ConfigBuilder.java:151) at com.baomidou.mybatisplus.generator.AutoGenerator.execute(AutoGenerator.java:93) at com.hmcsoft.generator.CodeGenerator.main(CodeGenerator.java:137)

Comment From: nieqiurong

2102

Comment From: nieqiurong

用3.3.2.1-SNAPSHOT试试,使用方式参考https://mp.baomidou.com/guide/install.html#snapshot