Skip to content

生成的实体类注释乱码了 #925

@tslzs

Description

@tslzs

/**
* CgI2WRIIcXZyVUVkRDEaELAKonyXMCONyYIZqfjOKYswAg==
*/
@column(name = "description")
private String description;
自动生成的实体类字段的注释乱码了,是由于什么原因呢?xml的配置如下:

    <plugin type="tk.mybatis.mapper.generator.MapperPlugin">
        <property name="mappers" value="tk.mybatis.mapper.common.Mapper"/>
        <property name="caseSensitive" value="true"/>
       <property name="forceAnnotation" value="true"/>
        <property name="beginningDelimiter" value="`"/>
        <property name="endingDelimiter" value="`"/>
        <property name="lombok" value="Data"/>
    </plugin>
    <plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>

    <commentGenerator>
        <property name="suppressAllComments" value="true"/>
    </commentGenerator>

    <jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
                    connectionURL="xxx&amp;useUnicode=true&amp;characterEncoding=UTF-8"
                    userId="xx"
                    password="xxx">
    </jdbcConnection>

    <!--MyBatis 生成器只需要生成 Model-->
    <javaModelGenerator targetPackage="org.example.testspringboot.entity"
                        targetProject="src/main/java"/>
    <sqlMapGenerator targetPackage="mapper"
                     targetProject="src/main/resources">
        <property name="enableSubPackages" value="false"/>
    </sqlMapGenerator>

    <javaClientGenerator type="XMLMAPPER" targetPackage="org.example.testspringboot.mapper"
                         targetProject="src/main/java">
        <property name="enableSubPackages" value="false"/>
    </javaClientGenerator>


    <table schema="s" tableName="ss" domainObjectName="ss">
        <generatedKey column="id" sqlStatement="JDBC" identity="true"/>
    </table>
</context>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions