星空网 > 软件开发 > Java

mybatis generator with oracle

1.generator.

<?<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">

<generatorConfiguration>
    <classPathEntry location="C:\Users\rocky\.m2\repository\com\oracle\ojdbc6\11.2.0.1.0\ojdbc6-11.2.0.1.0.jar" />

    <context id="MyBatis3" targetRuntime="MyBatis3">
        
        <jdbcConnection driver connectionURL="jdbc:oracle:thin:@192.168.1.5:1521:MYDB"
            userId="rocky" password="rocky">
        </jdbcConnection>
        
        <javaModelGenerator targetPackage="com.myproject.rocky.web.model" targetProject="./src">
        </javaModelGenerator>

        <sqlMapGenerator targetPackage="com.myproject.rocky.web.dao" targetProject="./src">
        </sqlMapGenerator>

        <javaClientGenerator type="            targetProject="./src">
        </javaClientGenerator>
    
        <table tableName="OBJ_USER" schema="rocky" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
    enableSelectByExample="false" selectByExampleQueryId="false">
            <property name="ignoreQualifiersAtRuntime" value="true" />
            <property name="runtimeTableName" value="OBJ_USER" />
            
        </table>
    </context>
</generatorConfiguration>

2.  mybatis-generator-core-1.3.2.jar

3.  java -jar mybatis-generator-core-1.3.2.jar -configfile generator.

4. some problems:

   ~if the table short of primary key, you maynot generate the right mapper file and interface(only has the insert method).

 

 




原标题:mybatis generator with oracle

关键词:oracle

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

跨境小黑:https://www.goluckyvip.com/tag/36920.html
跨境小记者:https://www.goluckyvip.com/tag/36921.html
跨境小捷捷:https://www.goluckyvip.com/tag/36922.html
跨境小可爱:https://www.goluckyvip.com/tag/36923.html
跨境小龙人:https://www.goluckyvip.com/tag/36924.html
跨境小蜜蜂研究员:https://www.goluckyvip.com/tag/36925.html
湘西游轮六 湘江游轮夜游:https://www.vstour.cn/a/411226.html
携程旅游网折扣优惠最新攻略(携程旅游网更佳折扣优惠):https://www.vstour.cn/a/411227.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流