We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0.5版本生成的Mapper没有生成@Mapper注解
The text was updated successfully, but these errors were encountered:
估计后面会加。现阶段的办法,自己传mapperAnnotationClass参数。模板根据这个参数来决定是否引入Mapper注解:
GeneratorConfig config = GeneratorConfig.builder() .jdbcUrl(url) .userName(username) .password(password) .driverClassName(driverClassName) .dateType(DateType.TIME_PACK) //数据库schema,MSSQL,PGSQL,ORACLE,DB2类型的数据库需要指定 //.schemaName("myBusiness") //数据库表前缀,生成entity名称时会去掉(v2.0.3新增) .tablePrefix(tablePrefix) .nameConverter(new NameConverter() { /** * 自定义Service类文件的名称规则 */ @Override public String serviceNameConvert(String entityName) { return entityName + "Service"; } }) .templateVaribleInjecter(tableInfo -> { Map<String, Object> map = new HashMap<>(); map.put("mapperAnnotationClass", org.apache.ibatis.annotations.Mapper.class); return map; }) //所有生成的java文件的父包名,后续也可单独在界面上设置 .basePackage(parent) .port(8068) .build(); MybatisPlusToolsApplication.run(config);
Sorry, something went wrong.
No branches or pull requests
2.0.5版本生成的Mapper没有生成@Mapper注解
The text was updated successfully, but these errors were encountered: