1.在pom文件中加入
org.springframework.boot
spring-boot-maven-plugin
org.mybatis.generator
mybatis-generator-maven-plugin
1.3.2
src/main/resources/generator.xml
true
true
Generate MyBatis Artifacts
generate
org.mybatis.generator
mybatis-generator-core
1.3.2
2.在resource中加入generation.xml
/p>
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
connectionURL="jdbc:oracle:thin:@localhost:1521/orcl"
userId="XXX"
password="XXX">
enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false">
enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false">
enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false">
3.在IDEA run中添加配置
选择新建run
然后按步骤新建
接着在name中可以输入generator,在command line中输入mybatis-generator:generate -e;然后点击apply应用
标签:generator,1.3,IDEA,maven,mybatis,ORACLE,org
来源: https://blog.csdn.net/weixin_42591722/article/details/86611347