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>


  • 相关阅读:
    redis的事务、主从复制、持久化
    redis的数据结构与命令
    redis的安装与配置
    JavaEE权限管理系统的搭建(八)--------角色的增删改
    JavaEE权限管理系统的搭建(七)--------管理用户的增删改
    JavaEE权限管理系统的搭建(六)--------使用拦截器实现菜单URL的跳转权限验证和页面的三级菜单权限按钮显示
    JavaEE权限管理系统的搭建(四)--------使用拦截器实现登录认证和apache shiro密码加密
    admin的基础配置
    ERP能解决企业五大不正常现象
    版本控制
  • 原文地址:https://www.cnblogs.com/aukle/p/3221707.html
Copyright © 2011-2022 走看看