首页 > 其他分享 >Mybatis代码生成——velocity模板元素

Mybatis代码生成——velocity模板元素

时间:2023-10-27 09:14:52浏览次数:27  
标签:代码生成 false name type propertyName Mybatis velocity null true

{
	date = 2020 - 09 - 26
	superControllerClassPackage = null
	superServiceImplClassPackage = com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
	baseResultMap = true
	sEntityName = dictBuilding
	superMapperClass = BaseMapper
	superControllerClass = null
	activeRecord = true
	superServiceClass = IService
	superServiceImplClass = ServiceImpl
	table = TableInfo(importPackages = [com.baomidou.mybatisplus.annotation.TableName
		com.example.mybatispluscodegeneral.entity.basic.BaseModel
		com.baomidou.mybatisplus.extension.activerecord.Model
		com.baomidou.mybatisplus.annotation.Version
		com.baomidou.mybatisplus.annotation.TableField
		java.io.Serializable
	] convert = true name = dict_building comment = 楼房类型字典表 entityName = DictBuilding mapperName = DictBuildingMapper xmlName = DictBuildingMapper serviceName = IDictBuildingService serviceImplName = DictBuildingServiceImpl controllerName = DictBuildingController fields = [TableField(convert = true keyFlag = false keyIdentityFlag = false name = cn_name type = varchar(64) propertyName = cnName columnType = STRING comment = 楼房类型名称( 中文) fill = null customMap = null)
		TableField(convert = true keyFlag = false keyIdentityFlag = false name = en_name type = varchar(64) propertyName = enName columnType = STRING comment = 楼房类型名称( 英文) fill = null customMap = null)
		TableField(convert = true keyFlag = false keyIdentityFlag = false name = description type = varchar(255) propertyName = description columnType = STRING comment = 描述 fill = null customMap = null)
	] commonFields = [TableField(convert = true keyFlag = true keyIdentityFlag = true name = id type = int(11) propertyName = id columnType = INTEGER comment = id fill = null customMap = null)
		TableField(convert = true keyFlag = false keyIdentityFlag = false name = weight type = int(11) propertyName = weight columnType = INTEGER comment = 权重 fill = null customMap = null)
		TableField(convert = true keyFlag = false keyIdentityFlag = false name = create_time type = bigint(20) propertyName = createTime columnType = LONG comment = 创建时间 fill = null customMap = null)
		TableField(convert = true keyFlag = false keyIdentityFlag = false name = update_time type = bigint(20) propertyName = updateTime columnType = LONG comment = 更新时间 fill = null customMap = null)
		TableField(convert = true keyFlag = false keyIdentityFlag = false name = create_by type = varchar(36) propertyName = createBy columnType = STRING comment = 创建者 fill = null customMap = null)
		TableField(convert = true keyFlag = false keyIdentityFlag = false name = update_by type = varchar(36) propertyName = updateBy columnType = STRING comment = 更新者 fill = null customMap = null)
		TableField(convert = true keyFlag = false keyIdentityFlag = false name = version type = int(11) propertyName = version columnType = INTEGER comment = 版本 fill = null customMap = null)
		TableField(convert = true keyFlag = false keyIdentityFlag = false name = deleted type = int(11) propertyName = deleted columnType = INTEGER comment = 是否有效 0 - 未删除 1 - 已删除 fill = null customMap = null)
		TableField(convert = true keyFlag = false keyIdentityFlag = false name = extra type = varchar(1000) propertyName = extra columnType = STRING comment = 额外信息 fill = null customMap = null)
		TableField(convert = true keyFlag = false keyIdentityFlag = false name = tenant_id type = varchar(255) propertyName = tenantId columnType = STRING comment = 租户id fill = null customMap = null)
	] fieldNames = cn_name en_name description)
	package = {
		Entity = com.example.mybatispluscodegeneral.entity
		Mapper = com.example.mybatispluscodegeneral.mapper
		ModuleName =
		Xml = com.example.mybatispluscodegeneral.resources.mapper
		ServiceImpl = com.example.mybatispluscodegeneral.service.impl
		Service = com.example.mybatispluscodegeneral.service
		Controller = com.example.mybatispluscodegeneral.controller
	}
	idType = null
	author = YeZhiyue
	swagger2 = true
	baseColumnList = true
	kotlin = false
	entityLombokModel = true
	superMapperClassPackage = com.baomidou.mybatisplus.core.mapper.BaseMapper
	restControllerStyle = true
	sServiceName = iDictBuildingService
	propertyNameToType = [StrengthenVelocityTemplateEngine.PropertyNameToType(propertyName = cnName type = Object)
		StrengthenVelocityTemplateEngine.PropertyNameToType(propertyName = enName type = Object)
		StrengthenVelocityTemplateEngine.PropertyNameToType(propertyName = description type = Object)
	]
	entityBuilderModel = true
	superServiceClassPackage = com.baomidou.mybatisplus.extension.service.IService
	entitySerialVersionUID = true
	versionFieldName = version
	entityBooleanColumnRemoveIsPrefix = false
	logicDeleteFieldName = deleted
	entityColumnConstant = false
	sMapperName = dictBuildingMapper
	config = com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder @f99f5e0
	enableCache = false
	entity = DictBuilding
	superEntityClass = BaseModel
}

标签:代码生成,false,name,type,propertyName,Mybatis,velocity,null,true
From: https://www.cnblogs.com/yifanSJ/p/17790973.html

相关文章

  • Mybatis代码生成——velocity模板语法
    velocity模板其实就是java不分语法的翻译,用到的属性还是java的方法,get,set,等1.截取部分字段substring复制代码1原始字符串:$!ag.tagValue,也许很长,前端页面展示时需要截取字符串。2#set($str=$!ag.tagValue)34#if($str.length()>30)5#set($str=$str.substring(0,30))......
  • Mybatis
    一种持久层框架,用来简化JDBC的开发持久层:负责将数据保存到数据库的那一层代码JavaEE:三层架构:表现层,业务层,持久层框架:就是一个半成品的软件,是一套可重用的,通用的软件基础代码模型Mybatis源码(ctrl+click打开):[GitHub-mybatis/mybatis-3:MyBatisSQLmapperframewo......
  • MyBatis-Plus学习笔记
    官方介绍mybatis-plus可以理解为加强版的mybatis,可以帮我们减少编写mapper中简单的sql语句,你可以理解为IPhone13和IPhone13Plus官网是这么说的:MyBatis-Plus(简称MP)是一个MyBatis的增强工具,在MyBatis的基础上只做增强不做改变,为简化开发、提高效率而生。并且还列出了以......
  • Mybatis,Lombok的使用
    Lombok是一个第三方插件,再也不用写get和set方法了 ,添加注解就行 有很多注解 偷懒用的,很方便,但还是不建议使用  因为:改变了语言的书写逻辑,新手看到这个实体类根本看不懂 使用步骤:一、安装Lombok插件二、注入依赖(jar包)(maven仓库取)三、使用 (这里介绍比较常用的)@D......
  • maven创建普通java项目访问mysql-mybatis
    基础资料:数据库:d1,表:t1,字段:xm,nl(即姓名、年龄),内容('zs',20;'ls',18)以下内容由官网“https://mybatis.org/mybatis-3/zh/getting-started.html”整理而来。不尽不实之处请参考官网原文。思想:1、在pom.xml文件中除了给出mybatis和jdbc的依赖之外,还应给出资源(配置)文件位置。2、在my......
  • Mybatis,核心配置中,属性优化,别名优化,设置,插件
    配置:MyBatis可以配置成适应多种环境不过要记住:尽管可以配置多个环境,但每个SqlSessionFactory实例只能选择一种环境.学会使用配置多套运行环境!: 通过ID来选择环境: 测试的时候可能有很多不同的数据库可以选择,但是最终只能选择一个Mybatis默认的事务管理器就是JDBC,连接池:......
  • Mybatis,模糊查询
    一、首先还是在mapper中定义方法,并且在xml中实现,,,,传入一个字符串 二、xml实现注意:传值时缺少两个%会报错 要么在传入值的时候添加(比较安全),要么在xml的SQL语句中添加1 2 三、测试 要注意的是,这种方法是有bug的一旦输入1or1=1可能会出现问题例如b站搜索框......
  • 实战系列(二)MybatisPlus详细介绍,包含代码详解
    MybatisPlus是一个功能强大的MyBatis增强工具,它提供了丰富的特性来简化操作数据库的代码。它主要用于简化JDBC操作,节省开发时间,并能够自动化完成所有的CRUD代码。MybatisPlus官网:https://baomidou.com/1.MybatisPlus的基本功能提供丰富的CRUD方法,包括:insert、selectById......
  • Mybatis(超级详细)
    Mybatis一、简介1、什么是MyBatisMyBatis本是apache的一个开源项目iBatis,2010年这个项目由apachesoftwarefoundation迁移到了googlecode,并且改名为MyBatis。2013年11月迁移到Github。MyBatis是一个优秀的持久层框架,它对jdbc的操作数据库的过程进行封装,使开......
  • Mybatis,增删改查CRUD
    在第一个Mybatis程序的基础上,继续实现功能一、实现根据id查询用户功能1、首先,在UserMapper里定义一个方法  因为要根据id查询所以要传入一个id2、在xml文件中实现,这里多了一个属性    parameterType  用来写传入的数据类型 3、测试一下,这里我们查询建了一个测......