Advertisement
Guest User

Untitled

a guest
Apr 30th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.88 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE generatorConfiguration
  3.  PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
  4.  "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
  5.  
  6. <generatorConfiguration>
  7.     <!-- Ubicación del JAR JDBC del gestor de Base de datos a usar, en este caso MySQL  -->
  8.   <classPathEntry location="C:\mysql-connector-java-5.1.38.jar" />
  9.  
  10.   <!--  Generaremos para MyBatis versión 3 -->
  11.   <context id="DB1" targetRuntime="MyBatis3">
  12.    
  13.     <!-- No generamos los comentarios -->
  14.     <commentGenerator>
  15.       <property name="suppressAllComments" value="true"/>
  16.     </commentGenerator>
  17.    
  18.       <!--  Parámetros de conexión a la bd -->
  19.     <jdbcConnection driverClass="com.mysql.jdbc.Driver"
  20.        connectionURL="jdbc:mysql://localhost:3306/javabase"
  21.        userId="root"
  22.        password="root">
  23.     </jdbcConnection>
  24.  
  25.     <javaModelGenerator targetPackage="com.example.persistence2.bean" targetProject="MAVEN">
  26.       <property name="enableSubPackages" value="true" />
  27.     </javaModelGenerator>
  28.  
  29.     <sqlMapGenerator targetPackage="com.example.persistence2.sqlmap"  targetProject="MAVEN">
  30.       <property name="enableSubPackages" value="true" />
  31.     </sqlMapGenerator>
  32.        
  33.     <javaClientGenerator type="XMLMAPPER" targetPackage="com.example.persistence2.dao"  targetProject="MAVEN">
  34.       <property name="enableSubPackages" value="true" />
  35.     </javaClientGenerator>
  36.  
  37.     <!-- Generamos el código fuente de todas las tablas evitando la generación varios métodos -->
  38.     <table tableName="%" enableCountByExample="false" enableDeleteByExample="false"
  39.            enableUpdateByExample="false" selectByPrimaryKeyQueryId="false"
  40.           selectByExampleQueryId="false" enableSelectByExample="false" modelType="flat">
  41.       <property name="useActualColumnNames" value="true"/>
  42.     </table>
  43.  
  44.   </context>
  45. </generatorConfiguration>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement