zoukankan      html  css  js  c++  java
  • 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>


  • 相关阅读:
    30个Python常用极简代码,拿走就用
    如果只写一行代码能实现什么?看完我彻底服了
    面试官问我:用了HTTPS就安全了吗?用了HTTPS会被抓包吗?我竟然回答不上来......
    程序员常见的口头禅
    没有心仪的offer,要不要找一个工作先凑合?
    微信新出“拍了拍”功能!
    UVa 340 Master-Mind Hints
    UVa 575 Skew Binary 歪斜二进制
    UVa 10250 The Other Two Trees
    UVa 10106 Product
  • 原文地址:https://www.cnblogs.com/aukle/p/3221707.html
Copyright © 2011-2022 走看看