mybatis.generator,这生成的是什么鬼?

csdn_jiangl 2018-11-05 05:03:11
我的数据库表就5个,生成的不知道是什么鬼
,菜鸟求指导
...全文
79 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lu2272382 2018-11-06
  • 打赏
  • 举报
回复
默认数据库的表吧
Zachariahs 2018-11-06
  • 打赏
  • 举报
回复
,,,,,,,你生成的是Mysql系统数据库的数据表啊....不信你自己看看你的MySQL是不是有一个你没创建过的库名字叫mysql..
Gin369 2018-11-05
  • 打赏
  • 举报
回复
给你一个好用的!!!!!!!!!!!
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE generatorConfiguration SYSTEM "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN">

-<generatorConfiguration>

<classPathEntry location="数据库jar"/>


-<context defaultModelType="flat" id="context1">

<!-- PO序列化 -->


<plugin type="org.mybatis.generator.plugins.SerializablePlugin"> </plugin>


-<commentGenerator>

<!-- 是否去除自动生成的注释 true:是 : false:否 -->


<property value="false" name="suppressAllComments"/>

</commentGenerator>

<jdbcConnection password="" userId="" connectionURL="jdbc:mysql://localhost:3306/base" driverClass="com.mysql.jdbc.Driver"> </jdbcConnection>


-<javaTypeResolver>

<property value="false" name="forceBigDecimals"/>

</javaTypeResolver>

<!--生成Model类存放位置 -->



-<javaModelGenerator targetProject="项目名称" targetPackage="实体类">

<property value="true" name="trimStrings"/>

</javaModelGenerator>

<!--生成映射文件存放位置 -->



-<sqlMapGenerator targetProject="项目名称" targetPackage="mapper">

<property value="true" name="trimStrings"/>

</sqlMapGenerator>

<!--生成Dao类存放位置 -->


<javaClientGenerator type="XMLMAPPER" targetProject="项目名称" targetPackage="mapper包结构位置"/>

<!--生成对应表及类名 <table schema="xja" tableName="COMPANY_PERMIT_PROCESS" enableCountByExample="false" enableUpdateByExample="false"enableDeleteByExample="false" enableSelectByExample="false"selectByExampleQueryId="false"></table> -->


</context>

</generatorConfiguration>

23,405

社区成员

发帖
与我相关
我的任务
社区描述
Java 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧