mybatis代码自动生成器报错Table configuration with catalog null,
来源:3-5 集成Mybatis官方代码生成器

pandaBgc
2021-03-06
Table configuration with catalog null, schema null, and table demo did not resolve to any tables,请问怎么解决啊?
4回答
-
会不会是库里面没有demo这张表?要先执行下创建表的SQL
042021-12-12 -
爬坡的程序猿
2021-03-16
似乎没有生成代码
012021-03-17 -
pandaBgc
提问者
2021-03-07
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<context id="Mysql" targetRuntime="MyBatis3" defaultModelType="flat">
<!-- 自动检查关键字,为关键字增加反引号 -->
<property name="autoDelimitKeywords" value="true"/>
<property name="beginningDelimiter" value="`"/>
<property name="endingDelimiter" value="`"/>
<!--覆盖生成XML文件-->
<plugin type="org.mybatis.generator.plugins.UnmergeableXmlMappersPlugin" />
<!-- 生成的实体类添加toString()方法 -->
<plugin type="org.mybatis.generator.plugins.ToStringPlugin"/>
<!-- 不生成注释 -->
<commentGenerator>
<property name="suppressAllComments" value="true"/>
</commentGenerator>
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/wiki?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false"
userId="wiki"
password="123456">
</jdbcConnection>
<!-- domain类的位置 -->
<javaModelGenerator targetProject="src\main\java"
targetPackage="com.zhuanye.wiki.domain"/>
<!-- mapper xml的位置 -->
<sqlMapGenerator targetProject="src\main\resources"
targetPackage="mapper"/>
<!-- mapper类的位置 -->
<javaClientGenerator targetProject="src\main\java"
targetPackage="com.zhuanye.wiki.mapper"
type="XMLMAPPER"/>
<table tableName="demo" domainObjectName="demo"/>
<!--<table tableName="ebook"/>-->
<!--<table tableName="category"/>-->
<!--<table tableName="doc"/>-->
<!--<table tableName="content"/>-->
<!--<table tableName="user"/>-->
<!-- <table tableName="ebook_snapshot"/>-->
</context>
</generatorConfiguration>012021-03-07 -
达布牛和小耗子的春天
2021-03-06
强烈建议你把你的代码图片粘贴过来,不然不好解决
012021-03-07
相似问题