maven插件:
org.mybatis.generator
mybatis-generator-maven-plugin
1.3.6
src/main/resources/generator/ShopGeneratorConfig.xml
true
true
resources下创建一个generator包,在包中创建ShopGeneratorConfig.xml
userId="xyb" password="payadd.cn">
targetProject="./src/main/java">
targetPackage/targetProject:同javaModelGenerator
type:选择怎么生成mapper接口(在MyBatis3/MyBatis3Simple下):
1,ANNOTATEDMAPPER:会生成使用Mapper接口+Annotation的方式创建(SQL生成在annotation中),不会生成对应的XML;
2,MIXEDMAPPER:使用混合配置,会生成Mapper接口,并适当添加合适的Annotation,但是XML会生成在XML中;
3,XMLMAPPER:会生成Mapper接口,接口完全依赖XML;
注意,如果context是MyBatis3Simple:只支持ANNOTATEDMAPPER和XMLMAPPER
\-\->
targetProject="./src/main/java">