当前位置: 首页 > news >正文

vps网站管理助手教程网站的建设 教学计划

vps网站管理助手教程,网站的建设 教学计划,探马scrm,iis 添加网站 win7刚学MyBatis逆向工程#xff08;还以为要反汇编呢.....#xff09; MyBatis逆向工程 个人理解就是链接数据库自动生成相关的增删改查相关的类 以及xml文件 #xff08;其中有一些不足 应该就是多表链接的问题需要自己写吧#xff09; MyBatis逆向工程 一般和主项目分开 比较…刚学MyBatis逆向工程还以为要反汇编呢..... MyBatis逆向工程 个人理解就是链接数据库自动生成相关的增删改查相关的类 以及xml文件 其中有一些不足 应该就是多表链接的问题需要自己写吧 MyBatis逆向工程 一般和主项目分开 比较清楚 另外 在配置文件中的包名希望和你工程文件包名都保持一致要不需要手动改 本项目来源 黑马商城资源 我的是mysql 项目地址 https://www.lanzous.com/i3eb3sj   generatorConfig.xml ?xml version1.0 encodingUTF-8? !DOCTYPE generatorConfigurationPUBLIC -//mybatis.org//DTD MyBatis Generator Configuration 1.0//ENhttp://mybatis.org/dtd/mybatis-generator-config_1_0.dtdgeneratorConfigurationcontext idtestTables targetRuntimeMyBatis3commentGenerator!-- 是否去除自动生成的注释 true是 false:否 --property namesuppressAllComments valuetrue //commentGenerator!--数据库连接的信息驱动类、连接地址、用户名、密码 --jdbcConnection driverClasscom.mysql.jdbc.DriverconnectionURLjdbc:mysql://localhost:3306/db_test userIdrootpasswordroot/jdbcConnection!-- jdbcConnection driverClassoracle.jdbc.OracleDriverconnectionURLjdbc:oracle:thin:127.0.0.1:1521:yycg userIdyycgpasswordyycg/jdbcConnection --!-- 默认false把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer为 true时把JDBC DECIMAL 和 NUMERIC 类型解析为java.math.BigDecimal --javaTypeResolverproperty nameforceBigDecimals valuefalse //javaTypeResolver!-- targetProject:生成PO类的位置 --javaModelGenerator targetPackagecom.pojotargetProject.\src!-- enableSubPackages:是否让schema作为包的后缀 --property nameenableSubPackages valuefalse /!-- 从数据库返回的值被清理前后的空格 --property nametrimStrings valuetrue //javaModelGenerator!-- targetProject:mapper映射文件生成的位置 --sqlMapGenerator targetPackagecom.mappertargetProject.\resource!-- enableSubPackages:是否让schema作为包的后缀 --property nameenableSubPackages valuefalse //sqlMapGenerator!-- targetPackagemapper接口生成的位置 --javaClientGenerator typeXMLMAPPERtargetPackagecom.mappertargetProject.\src!-- enableSubPackages:是否让schema作为包的后缀 --property nameenableSubPackages valuefalse //javaClientGenerator!-- 指定数据库表 --table schema tableNameuser/table!--table schema tableNamepassword/table--!--table schema tableNamecountrylanguage/table--!--table schema tableNamesku/table--!--table schema tableNamebrand/table--!--table schema tableNamead_category/table--!--table schema tableNamead_content/table--!--table schema tableNameuser/table--!--table schema tableNameaddress/table--!--table schema tableNameprovinces/table--!--table schema tableNamecities/table--!--table schema tableNameareas/table--!--table schema tableNameorder_sku/table--!--table schema tableNameorderinfo/table--!-- 有些表的字段需要指定java类型table schema tableNamecolumnOverride column javaType //table --/context /generatorConfiguration View Code 自动生成类的代码 package com.itcast;import java.io.File; import java.util.ArrayList; import java.util.List;import org.mybatis.generator.api.MyBatisGenerator; import org.mybatis.generator.config.Configuration; import org.mybatis.generator.config.xml.ConfigurationParser; import org.mybatis.generator.internal.DefaultShellCallback;public class GeneratorSqlmap {public void generator() throws Exception{ListString warnings new ArrayListString();boolean overwrite true;File configFile new File(generatorConfig.xml); ConfigurationParser cp new ConfigurationParser(warnings);Configuration config cp.parseConfiguration(configFile);DefaultShellCallback callback new DefaultShellCallback(overwrite);MyBatisGenerator myBatisGenerator new MyBatisGenerator(config,callback, warnings);myBatisGenerator.generate(null);} public static void main(String[] args) throws Exception {try {GeneratorSqlmap generatorSqlmap new GeneratorSqlmap();generatorSqlmap.generator();} catch (Exception e) {e.printStackTrace();}}}        关于自动生成的文件一般有两种 一个是example 一个是你数据库的名字类 你 数据库名字(类) set 和get方法用来设置里面的值 比如你Update  一个表  给定的方法一般都是这个具体参照  https://blog.csdn.net/biandous/article/details/65630783 example 类一般是用于添加条件的 比如 你 select username from t_user where username (这里一般是你example 类添加的)转载于:https://www.cnblogs.com/xuexidememeda/p/10513651.html
http://www.zqtcl.cn/news/880670/

相关文章:

  • 中外网站建设区别绵阳市城市建设档案馆网站
  • php电子商务网站源码凉山彝族自治州网站建站
  • 网站建设当前位置图标移动网站登录入口
  • 个人网站备案 淘宝客wordpress 面包屑导航修改
  • 网站建设 总体思路企业网站建设费是无形资产吗
  • 专业外贸网站开发上海外包公司网站建设
  • iis网站伪静态为什么要网站备案
  • 什么是网站东莞常平律师事务所
  • 网站落地页制作最简单的网站
  • 长兴县建设管理网站抖音小程序注册
  • 做网站容易挣钱吗厦门网页制作厦门小程序app
  • 大型网站开发前端准备北京网站建设V芯ee8888e
  • 关于做营销型网站的建议网页小游戏无需登录
  • 网站短期培训能学什么高校网站建设评比标准
  • 做外贸什么网站比较好做dede鲜花网站模板下载
  • 网站广告推广怎么做网站怎么优化关键词排名
  • 怎样做易支付网站数字化校园建设网站
  • 东莞做网站哪里好公司网站维护怎么维护
  • 微信网站界面设计江阴网站开发公司电话
  • 手机制作网站的软件离石做网站的网络公司
  • 贺州住房和城乡建设部网站广州商城网站建设地址
  • 响应式网站报价服务器上的wordpress
  • 做培训的都上哪些网站东莞网站新站排名
  • 济南网站制郑州快速建站公司
  • 网站推广企业网站建设属于什么工作
  • 公司做网站还是做app用土豆做美食的视频网站
  • 做网站除了广告还有什么收入的中国计算机技术职业资格网
  • 陕西建设银行网站查排名的软件有哪些
  • 企业网站备案教程北京专业做网站的
  • 音乐网站如何建设的如何做学校网站