MyEclipse2018中安装Mybatis generator插件的实现步骤

2025-05-29 0 29

前言

在使用maven配置mybatis generator插件时报以下错误,generator插件一直无法使用,查询资料说和eclipse版本有关系。

the pom for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available

无奈之下选择安装eclipse的插件。

安装步骤(基于myeclipse2018)

点击help–>install from catalog…

在搜索框输入mybatis generator出现点击install–>finish.如下图所示

MyEclipse2018中安装Mybatis generator插件的实现步骤

安装完成后在项目中右击新建mybatis generator configuration file.如下图所示

MyEclipse2018中安装Mybatis generator插件的实现步骤

点击next 选择文件生成的路径以及文件名,如下图所示

MyEclipse2018中安装Mybatis generator插件的实现步骤

点击finfish。具体配置可参考以下配置进行修改

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22
<?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="context1">

<!-- 数据库链接url,用户名、密码 -->

<jdbcconnection connectionurl="jdbc:mysql://localhost:3306/miaosha?characterencoding=utf8" driverclass="com.mysql.jdbc.driver" password="jma3" userid="root" />

<!-- 生成model模型,对应的包 -->

<javamodelgenerator targetpackage="com.jian.miaosha.dataobject" targetproject="miaosha/src/main/java" />

<!-- 对应的xml mapper文件 -->

<sqlmapgenerator targetpackage="mapping" targetproject="miaosha/src/main/resources" />

<!-- 对应的dao接口 -->

<javaclientgenerator targetpackage="com.jian.miaosha.dao" targetproject="miaosha/src/main/java" type="xmlmapper" />

<!-- 要生成的表 -->

<table schema="" tablename="customer_password">

</table>

<table schema="" tablename="customer">

</table>

</context></generatorconfiguration>

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持快网idc。

原文链接:https://segmentfault.com/a/1190000018145466

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

快网idc优惠网 建站教程 MyEclipse2018中安装Mybatis generator插件的实现步骤 https://www.kuaiidc.com/109700.html

相关文章

发表评论
暂无评论