mybatis的xml中使用大于小于号
发表于|更新于
|浏览量:
今天写一个范围查询接口的时候
发现一个问题,mybatis里的xml,我写小于的时候,它给我报错了?!
于是去网上搜了搜,原来是xml给我转义了。。。
大概有两种解决办法,一种是用替代符
1 | < #小于 |
不过个人觉得这种阅读性太差,过久了说不定就不知道这啥玩意了
所以推荐第二种办法
1 | <![CDATA[<]]> #小于 |
大于(大于等于)其实可以不加,但个人强迫症。。。
小于都加了,大于也加个吧hh
相关推荐
2022-10-07
ballcat
对所有的人以诚相待,同多数人和睦相处,和少数人常来常往,只跟一个人亲密无间——富兰克林 分享一个简单的项目脚手架 官方文档:http://www.ballcat.cn/ gitee:https://gitee.com/ballcat-projects/ballcat github:https://github.com/ballcat-projects/ballcat 非常好用
2023-12-30
file获取路径区别
男人勤劳家才富,女人节俭纱成布——佚名 这里 12345678910111213import java.io.File;class Scratch { public static void main(String[] args) throws Exception { File file = new File("../scratch.java"); String path = file.getPath(); String absolutePath = file.getAbsolutePath(); String canonicalPath = file.getCanonicalPath(); System.out.println("path:" + path); System.out.println("absolutePath:" + absolutePath); System.out.print...
2023-09-19
file4j
鲸落海底,哺暗界众生十五年。——加里·斯奈德 代码仓库 官方文档 在 SpringBoot 中通过简单的方式将文件存储到 本地、FTP、SFTP、WebDAV、谷歌云存阿里云OSS、华为云OBS、七牛云Kodo、腾讯云COS、百度云 BOS、又拍云USS、MinIO、 AWS S3、金山云 KS3、美团云 MSS、京东云 OSS、天翼云 OOS、移动云 EOS、沃云 OSS、 网易数帆 NOS、Ucloud US3、青云 QingStor、IBM COS 等平台 12345<dependency> <groupId>cn.xuyanwu</groupId> <artifactId>spring-file-storage</artifactId> <version>1.0.3</version></dependency>
2020-09-23
Arrays.asList的坑
我认为对于一切情况,只有“热爱”才是最好的老师。——爱因斯坦 今天写代码遇到一个坑 本身不是什么难的逻辑,结果自己学艺不精忘了,导致程序出现不该出现的异常 是这样的,数据库里原有存了这么几张图片,使用的是“;”分割 现在要进行一个追加并去重的操作 1234567// 原有数据库里的图片String pic = "http://p16.qhimg.com/bdm/960_593_0/t0195d14f593431562a.jpg;" + "http://p18.qhimg.com/bdm/480_296_0/t014a0ca534d64adbba.jpg;" + "http://p18.qhimg.com/bdm/480_296_0/t014a0ca534d64adbba.jpg;" + "http://p18.qhimg.com/bdm/480_296_0/t014a0ca534d64adbba.jpg";// 需要追加的图片String appendPi...
2020-11-17
Stream流の二维数组List<List>互转
少而好学,如日出之阳;壮而好学,如日中之光;老而好学,如炳烛之明。一一刘向 数组转List<List<Integer>> 1List<List<Integer>> collect = Arrays.stream(array).map(a1 -> Arrays.stream(a1).boxed().collect(Collectors.toList())).collect(Collectors.toList()); List<List<Integer>>转int[][] 1array = collect.stream().map(integers -> integers.stream().mapToInt(value -> value).toArray()).toArray(int[][]::new); 二维数组和List<List<Integer>>之间的转换使用stream的话就非常简单了 12345678910int[][] array = new in...
2022-11-09
springboot,get传日期格式转换
男女双方愿意相互观察是爱情的第一征象——瓦西列 对于这种请求: 1http://api.achao.cn/example?date=2022-11-09 我们可以配置转换器,mvc则会自动帮我们转 12345678910111213141516171819202122232425262728293031323334353637383940import cn.hutool.core.date.DatePattern;import io.github.vampireachao.stream.core.optional.Sf;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.context.annotation.Configuration;import org.springframework.core.convert.ConversionService;import org.springframework.core.convert.converter.C...

阿超
我的名字叫阿超 年龄25岁 家在北京市 职业是软件开发 每天最晚也会在八点前回家 不抽烟 酒浅尝辄止 晚上十二点上床 保证睡足八个小时 睡前写一篇博客 再做二十分钟俯卧撑暖身 然后再睡觉 基本能熟睡到天亮 像婴儿一样不留下任何疲劳和压力 就这样迎来第二天的早晨 健康检查结果也显示我很正常 我想说明我是一个不论何时都追求内心平稳的人 不拘泥于胜负 不纠结于烦恼 不树立使我夜不能寐的敌人 这就是我在这社会的生活态度
Follow Me公告
This is my Blog