Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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>
- <!-- Ubicación del JAR JDBC del gestor de Base de datos a usar, en este caso MySQL -->
- <classPathEntry location="C:\mysql-connector-java-5.1.38.jar" />
- <!-- Generaremos para MyBatis versión 3 -->
- <context id="DB1" targetRuntime="MyBatis3">
- <!-- No generamos los comentarios -->
- <commentGenerator>
- <property name="suppressAllComments" value="true"/>
- </commentGenerator>
- <!-- Parámetros de conexión a la bd -->
- <jdbcConnection driverClass="com.mysql.jdbc.Driver"
- connectionURL="jdbc:mysql://localhost:3306/javabase"
- userId="root"
- password="root">
- </jdbcConnection>
- <javaModelGenerator targetPackage="com.example.persistence2.bean" targetProject="MAVEN">
- <property name="enableSubPackages" value="true" />
- </javaModelGenerator>
- <sqlMapGenerator targetPackage="com.example.persistence2.sqlmap" targetProject="MAVEN">
- <property name="enableSubPackages" value="true" />
- </sqlMapGenerator>
- <javaClientGenerator type="XMLMAPPER" targetPackage="com.example.persistence2.dao" targetProject="MAVEN">
- <property name="enableSubPackages" value="true" />
- </javaClientGenerator>
- <!-- Generamos el código fuente de todas las tablas evitando la generación varios métodos -->
- <table tableName="%" enableCountByExample="false" enableDeleteByExample="false"
- enableUpdateByExample="false" selectByPrimaryKeyQueryId="false"
- selectByExampleQueryId="false" enableSelectByExample="false" modelType="flat">
- <property name="useActualColumnNames" value="true"/>
- </table>
- </context>
- </generatorConfiguration>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement