• mybatis_Generator配置


    mybatis-generator-core-1.3.2

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
    
    <generatorConfiguration>
    	
    	<!-- The full path name of a JAR/ZIP file to add to the classpath, or a directory to add to the classpath. -->
    	<classPathEntry location="./ojdbc14.jar" />
    	
    	<!-- id : A unique identifier for this context. This value will be used in some error messages. -->
    	<!-- targetRuntime : This property is used to specify the runtime target for generated code.default is "MyBatis3"-->
    	<context id="id0907" targetRuntime="MyBatis3">
    
    		<commentGenerator>
    			<property name="suppressAllComments" value="false" />
    			<property name="suppressDate" value="true" />
    		</commentGenerator>
    
    		<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
    			connectionURL="jdbc:oracle:thin:@//localhost/orcl"
    			userId="ultimatefighter" password="champion" />
    
    		<!--When the property is true, the Java type resolver will always use java.math.BigDecimal if the database column is of type DECIMAL or NUMERIC.-->
    		<javaTypeResolver>
    			<property name="forceBigDecimals" value="false" />
    		</javaTypeResolver>
    
    		<!-- It is used to define properties of the Java model generator. -->
    		<javaModelGenerator targetPackage="com.soul.pojo" targetProject="./">
    			<property name="enableSubPackages" value="false" />
    			<!--  trim the white space from character fields returned from the database -->
    			<property name="trimStrings" value="true" />
    		</javaModelGenerator>
    
    		<!-- It is used to define properties of the SQL map(.xml) generator. -->
    		<sqlMapGenerator targetPackage="com.soul.dao"
    			targetProject="./">
    			<!-- If this property is true, the generated SQL Map for the table will be placed in the package "com.soul.dao.myschema" -->
    			<property name="enableSubPackages" value="false" />
    			<!--  trim the white space from character fields returned from the database -->
    			<property name="trimStrings" value="true" />
    		</sqlMapGenerator>
    
    		<!-- It is used to define properties of the Java client generator -->
    		<!-- XMLMAPPER : The interfaces will be dependent on generated XML mapper files.-->
    		<javaClientGenerator type="XMLMAPPER"
    			targetPackage="com.soul.dao" targetProject="./">
    			<property name="enableSubPackages" value="false" />
    		</javaClientGenerator>
    
    		<!-- domainObjectname : The base name from which generated object names will be generated.-->
    		<table schema="" tableName="SOUL_STUDENT" domainObjectName="student">
    			<generatedKey column="SOUL_ID" sqlStatement="select SOUL_ID() FROM DUAL" identity="false" />
    		</table>
    	
    </generatorConfiguration>


  • 相关阅读:
    1055. [HAOI2008]玩具取名【区间DP】
    BZOJ2435:[NOI2011]道路修建 (差分)
    1084. [SCOI2005]最大子矩阵【网格DP】
    1060. [ZJOI2007]时态同步【树形DP】
    1050. [HAOI2006]旅行【并查集+枚举】
    2463. [中山市选2009]谁能赢呢?【博弈论】
    luogu P1195 口袋的天空
    luogu P1162 填涂颜色
    luogu P1223 排队接水
    luogu P1331 海战
  • 原文地址:https://www.cnblogs.com/aukle/p/3221707.html
Copyright © 2020-2023  润新知