}
原先的代码如下,将Hikari换成BeeCP后报错内容如下:
Exception in thread "main" java.lang.NullPointerException
at cn.beecp.pool.ProxyResultSetBase.close(ProxyResultSetBase.java:73)
at org.beetl.sql.core.meta.SchemaMetadataManager.initMetadata(SchemaMetadataManager.java:257)
at org.beetl.sql.core.meta.SchemaMetadataManager.allTable(SchemaMetadataManager.java:96)
at org.beetl.sql.gen.SourceConfig.genAll(SourceConfig.java:176)
at org.beetl.sql.gen.SourceConfig.genAll(SourceConfig.java:194)
at com.msj.beetlsqldemo.util.MysqlGenerator.main(MysqlGenerator.java:26)
import cn.hutool.setting.dialect.Props; import com.zaxxer.hikari.HikariDataSource; import org.beetl.sql.core.*; import org.beetl.sql.core.db.MySqlStyle; import org.beetl.sql.gen.SourceBuilder; import org.beetl.sql.gen.SourceConfig; import org.beetl.sql.gen.simple.EntitySourceBuilder; import org.beetl.sql.gen.simple.MDSourceBuilder; import org.beetl.sql.gen.simple.MapperSourceBuilder; import org.beetl.sql.gen.simple.SimpleMavenProject;
import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicReference;
public class MysqlGenerator { public static void main(String[] args) { SQLManager sqlManager = createSQLManager(); SourceConfig config = new SourceConfig(sqlManager, createSourceBuilder()); config.setPreferDoubleType(SourceConfig.PreferDoubleType.BigDecimal); config.setPreferDateType(SourceConfig.PreferDateType.LocalDate); SimpleMavenProject mavenProject = createBaseProject(); config.genAll(mavenProject); }
} 原先的代码如下,将Hikari换成BeeCP后报错内容如下: Exception in thread "main" java.lang.NullPointerException at cn.beecp.pool.ProxyResultSetBase.close(ProxyResultSetBase.java:73) at org.beetl.sql.core.meta.SchemaMetadataManager.initMetadata(SchemaMetadataManager.java:257) at org.beetl.sql.core.meta.SchemaMetadataManager.allTable(SchemaMetadataManager.java:96) at org.beetl.sql.gen.SourceConfig.genAll(SourceConfig.java:176) at org.beetl.sql.gen.SourceConfig.genAll(SourceConfig.java:194) at com.msj.beetlsqldemo.util.MysqlGenerator.main(MysqlGenerator.java:26)
版本:3.1.5(1.6.9不报错)