Skip to content
New issue

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

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

Open
tslzs opened this issue Sep 11, 2024 · 0 comments
Open

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

tslzs opened this issue Sep 11, 2024 · 0 comments

Comments

@tslzs
Copy link

tslzs commented Sep 11, 2024

/**
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant