• 使用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>  


  • 相关阅读:
    Mybatis 用Demo去入门 (使用数据库的查询操作测试)
    Spring Mvc 用Demo去学习
    OGNL的学习
    hibernate 运用 中的 细节分析
    pip3问题pip is configured with locations that require TLS/SSL, however the ssl module in Python is not avail
    更换centos7源
    Centos7下python2.7升级至3.6
    service adminsetd start
    kali更新源
    redhat7 配置使用centos的yum源
  • 原文地址:https://www.cnblogs.com/jpfss/p/8302122.html
Copyright © 2020-2023  润新知