MyBatis Generator with Maven

基本上按照官网的操作就行,有些坑的地方提醒下:

  1. pom.xml 加入plugins后execution报错,Plugin execution not covered by lifecycle configuration.
    解决办法,plugins外层增加pluginManagement

  2. 如何使用?

  • 命令行
    mvn mybatis-generator:generate
  • 菜单操作
    * 右键--》run as --》 maven bulid --》弹出对话框 --》在goals中输入mybatis-generator:generate
    * 点击select --》选择你的mybatis插件 --》apply --》run

你可能感兴趣的:(MyBatis Generator with Maven)