web123456

In IDEA, Maven generates Mybatis' SQL server database code and mapping files

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration PUBLIC "-////DTD MyBatis Generator Configuration 1.0//EN" "/dtd/mybatis-generator-config_1_0.dtd"> <generatorConfiguration> <!--Import attribute configuration--> <properties resource=""></properties> <!--Specify the specific databasejdbcdrivejarThe location of the package--> <classPathEntry location="${}"/> <context id="default" targetRuntime="MyBatis3"> <!-- optional, designed to createclassWhen controlling the comments--> <commentGenerator> <property name="suppressDate" value="true"/> <property name="suppressAllComments" value="true"/> </commentGenerator> <!--jdbcDatabase connection--> <jdbcConnection driverClass="${}" connectionURL="${}" userId="${}" password="${}"> </jdbcConnection> <!-- Non-essential, type processor, in database type andjavaConversion control between types--> <javaTypeResolver> <property name="forceBigDecimals" value="false"/> </javaTypeResolver> <!-- ModelModel Generator,Used to generate primary keyskeyclass, record class and queryExamplekind targetPackage Specify the generatedmodelThe package name is generated targetProject Specify the path under this project --> <javaModelGenerator targetPackage="" targetProject="src"> <!-- Whether subpackages are allowed, i.e. --> <property name="enableSubPackages" value="false"/> <!-- Is it correctmodelAdd a constructor--> <property name="constructorBased" value="true"/> <!-- Is it right?CHARType column data to performtrimoperate--> <property name="trimStrings" value="true"/> <!-- EstablishedModelIs the object not changeable? That is, it is generatedModelThere will be no object setterMethod, only construct method--> <property name="immutable" value="false"/> </javaModelGenerator> <!--MapperThe directory where the mapping file is generated generates the corresponding table for each databaseSqlMapdocument--> <sqlMapGenerator targetPackage="" targetProject="src"> <property name="enableSubPackages" value="false"/> </sqlMapGenerator> <!-- Client code to generate easy-to-use targetsModelObjects andXMLConfiguration file code type="ANNOTATEDMAPPER",generateJava Model and annotation-basedMapperObject type="MIXEDMAPPER",Generate annotation-basedJava Model and correspondingMapperObject type="XMLMAPPER",generateSQLMap XMLDocumentary and independentMapperinterface --> <javaClientGenerator targetPackage="" targetProject="src" type="XMLMAPPER"> <property name="enableSubPackages" value="true"/> </javaClientGenerator> <table tableName="le_tixing" domainObjectName="ceshi" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"> </table> </context> </generatorConfiguration>