![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Mybatis
努力不脱发选手
努力的程度要超过父母老去的速度。
展开
-
mybatis plus collection
mybatis 和 mybatis plus 的区别 就在于,需要把数据库的字段和数据层的类 做个关联。类似这种package com.sgm.b2c.lmc.entity;import java.util.ArrayList;import java.util.List;import lombok.Data;import lombok.EqualsAndHashCode;import lombok.experimental.Accessors;import com.baomidou.m原创 2020-08-11 14:26:07 · 5071 阅读 · 2 评论 -
jdbc mybatis循环嵌套 迭代嵌套 collection ( n层,1层 2层 3层 4层 5层 无论任意层都可以系列)
当我们面对一对多的映射关系 ,我们会使用collection。一层嵌套非常的简单,网上教程很多,https://msd.misuland.com/pd/2878646270447061150?page=1这里有一个参考的,先把这个看懂。 <collection property="studentList" column="classID" javaType="ArrayList" ofType="com.cn.hnust.pojo.StudentEntit原创 2020-08-10 17:28:43 · 1680 阅读 · 0 评论 -
sql查询出的数字结果换成对应文本 前端pipe管道解决,后端sql解决
在数据库里我们通常用数字表达不同的情况,比如 1 喜欢 2不喜欢 3讨厌但是在前端和保存下来的表格里面我们往往想看到对应的文本。现在有两种方法来解决1 后端sql语句解决select A.STATUS,(CASE BAPP.STATUS WHEN 1 THEN '喜欢' WHEN 2 THEN '不喜欢' WHEN 3 THEN '讨厌' END) AS STATUSSTR,...原创 2020-07-01 11:09:34 · 1482 阅读 · 0 评论 -
element type set / insert must be declared
出现这个报错是因为在update时候 我写成大写的 这里严格区分大小写 全部小写 <update id="updateTT"> <foreach collection="list" item="item" index="index" separator=";"> UPDATE TT <SET> QTY = #{item.q...原创 2020-02-20 19:35:41 · 880 阅读 · 0 评论 -
用spring boot 解放你的后端
WHAT IS SPRING:pring是一个轻量级的企业级Java开发框架FRAME:CORE OF SPRING:一:控制反转(Inversion of Control,缩写为IoC)是面向对象编程中的一种设计原则,可以用来减低计算机代码之间的耦合度。其中最常见的方式叫做依赖注入(Dependency Injection,简称DI),还有一种方式叫“依赖查找”(Dependen...原创 2019-12-30 10:23:22 · 316 阅读 · 0 评论 -
Mybatis Spirngboot Postmapping使用json传输参数list
在controller里面写好import net.sf.json.JSONObject; @PostMapping("/insertlist") public void insertList(@RequestBody JSONObject params) { List<classDefinedByYou> dishes = params.getJSONArray("dish...原创 2019-12-10 14:27:08 · 10079 阅读 · 0 评论 -
mybatis 配置yml 查看sql日志
mybatis: mapper-locations: classpath:mybatis/*.xml configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl ps: 两个冒号不能写在一行原创 2019-12-10 10:56:37 · 3726 阅读 · 0 评论 -
Mybatis invalid bound statement (not found)
我的这个报错不是配置到 或者 XML文件的报错是运行test之后的报错这个报错是说绑定声明不可用 我的原因是 函数名错了,调用的时候的函数名和mapper.xml 或者 dao里面函数名匹配不起来...原创 2019-11-29 15:11:40 · 88 阅读 · 0 评论 -
No plugin found for prefix 'mybatis-generator' in the current project ORA-28040: No matching authen
这个报错 有几个可能0 你mybatis-generator:generate 打错了这是有可能的1 最简单的解决方法maven runs as :maven clearmaven install基本没法解决问题2 你的pom.xml配置有问题缺了 plugin 或者 mojo之类的给一个pom.xml <dependencies> <dependenc...原创 2019-11-26 16:02:50 · 449 阅读 · 0 评论