• 使用mybatis generator 生成annotation形式的mapper


            最近使用mybatisgenerator时,希望生成annotation的mapper,在网上基本桑没有相关配置,记录,做以下记录:


    1. <?xml version="1.0" encoding="UTF-8" ?>  
    2. <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >  
    3. <generatorConfiguration ><classPathEntry  
    4.         location="jar包位置" />  
    5.   <context id="context1" >  
    6.     <jdbcConnection driverClass="driver" connectionURL="jdbc" userId="**" password="**" />  
    7.     <javaModelGenerator targetPackage="package" targetProject="project" />  
    8.     <sqlMapGenerator targetPackage="package" targetProject="project" /></span>  
    9.     <javaClientGenerator targetPackage="package" targetProject="project" type="<span style="color:#ff0000;">ANNOTATEDMAPPER/XMLMAPPER</span>/>  
    10.   
    11.     <table schema="schema" tableName="table"  domainObjectName="javaBean" >  
    12.     </table>  
    13.       
    14.   </context>  
    15. </generatorConfiguration>  


  • 相关阅读:
    NTP时间同步
    《暗时间》
    寻找字典公共键
    maven pom.xml的execution报错
    maven安装scala插件
    html 和xml
    sparkstreaming+kafka
    zookeeper错误Error contacting service. It is probably not running.
    eclipse开发hive2程序
    eclipse开发hbase程序
  • 原文地址:https://www.cnblogs.com/jpfss/p/8302122.html
Copyright © 2020-2023  润新知