技术专区
-
搭建MyBatis
1创建maven工程 a>打包方式:jar b>引入依赖 <dependencies> <!-- Mybatis核心 --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifac…
-
创建MyBatis的核心配置文件
习惯上命名为mybatis-config.xml,这个文件名仅仅只是建议,并非强制要求。将来整合Spring 之后,这个配置文件可以省略,所以大家操作时可以直接复制、粘贴。 核心配置文件主要用于配置连接数据库的环境以及MyBatis…
-
07-MyBatis中的动态标签
MyBatis中的动态标签 1、if标签 if标签是为了判断传入的值是否符合某种条件,比如是否不为空 2、where标签 where标签可以用来做动态拼接查询条件,当和if标签配合的时候,不用显示的声明类型where 1 = 1这种无用的…
-
06-MyBatis中ResultType和ResultMap的区别
MyBatis中ResultType和ResultMap的区别 如果数据库结果集中的列名和要封装的属性名完全一致的话用resultType属性 如果数据库结果集中的列名和要封装实体的属性名有不一致的情况使用resultMap属性 通过resultMap手动…
-
05-MyBatis中${}和#{}的区别
MyBatis中${}和#{}的区别 #{}是占位符,预编译处理;${}是字符串替换 MyBatis在处理#{}的时候,会将SQL中的#{}转换为占位符?,调用PrepareStatement的set方法来赋值 MyBatis在处理${}的时候,就是把${}替换成变量的…
-
LeetCode 128 Longest Consecutive Sequence
Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in /(O(n)/) time. Solution 既然不能排序,那就用 /(set/)…
-
解决IDEA Maven依赖下载总是失败的几种方法
参考地址: https://blog.csdn.net/weixin_40517799/article/details/121277524 # 这里写你的仓库路径 # REPOSITORY_PATH=~/.m2/repository REPOSITORY_PATH=D:/devtool/maven/repository echo 正在搜索... find $R…
-
LeetCode 1231 Divide Chocolate 二分答案
You have one chocolate bar that consists of some chunks. Each chunk has its own sweetness given by the array sweetness. You want to share the chocolate with your k friends so you start cutting the ch…
-
C#教程 - Lambda Expressions
更新记录转载请注明出处:https://www.cnblogs.com/cqpanda/p/16690958.html2022年9月17日 发布。2022年9月10日 从笔记迁移到博客。 Lambda Expressions说明 在匿名函数的基础上删除delegate关键字 在参数列表和函…