上一页 1 2 3 4 5 6 ··· 12 下一页
摘要: select * from AAA where id in (select id from BBB)等价于:select * from AAA where exists(select * from BBB where BBB.id=AAA.id) 执行顺序不同,in 先执行内层查询,exists先查 阅读全文
posted @ 2022-08-01 16:26 ジ绯色月下ぎ 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 说明:今天写代码发现对net.sf.json.JSONObject取值后判断是否为null,死活进不去,打印了获取属性后的值,发现是一个被封装为JSONNull对象 import net.sf.json.JSONNull; import net.sf.json.JSONObject; import 阅读全文
posted @ 2022-07-01 15:33 ジ绯色月下ぎ 阅读(403) 评论(0) 推荐(0) 编辑
摘要: 说明:向阿里云桶上传图片的时候报错 com.aliyun.oss.OSSException: The difference between the request time and the current time is too large.[ErrorCode]: RequestTimeTooSk 阅读全文
posted @ 2022-05-18 18:23 ジ绯色月下ぎ 阅读(1049) 评论(0) 推荐(0) 编辑
摘要: 说明:需要从a库的sysuser表 清洗数据到b库的user表中 以下脚本都是直接执行的,不需要创建函数或者存储过程 创建数据库连接 CREATE PUBLIC DATABASE LINK 连接名 CONNECT TO 数据库用户名 IDENTIFIED BY "数据库密码 保留双引号" USING 阅读全文
posted @ 2022-03-22 17:20 ジ绯色月下ぎ 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 说明:开发中经常会用到dto传参,需要对一些必填的属性进行校验,故封装如下方法,参数obj是java对象,exceptProperties是不需要校验的对象属性 /** * * @param obj 对象 * @param exceptProperties 不校验的属性集合 * @return */ 阅读全文
posted @ 2022-03-18 13:16 ジ绯色月下ぎ 阅读(1098) 评论(2) 推荐(0) 编辑
摘要: Aviator支持大部分运算操作符, 包括算术操作符、关系运算符、逻辑操作符、位运算符、正则匹配操作符(=~)、三元表达式(?😃, 并且支持操作符的优先级和括号强制优先级, 具体请看后面的操作符列表, 支持自定义函数. String expression = "a>=1/1.5"; // 编译表达 阅读全文
posted @ 2022-03-08 11:27 ジ绯色月下ぎ 阅读(1118) 评论(0) 推荐(0) 编辑
摘要: 说明:一个tomcat容器需要部署同一个项目的war包部署两个,对war包重命名之后一个叫A,一个叫B,结果启动后A成功了,B启动失败抛异常 org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to regist 阅读全文
posted @ 2022-02-18 16:59 ジ绯色月下ぎ 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 报错的写法: <if test="docIdentifierList !=null and docIdentifierList.size() > 0"> and <foreach collection="docIdentifierList" item="item" index="index" sep 阅读全文
posted @ 2022-02-10 13:32 ジ绯色月下ぎ 阅读(702) 评论(0) 推荐(0) 编辑
摘要: 说明:最近在搭建hexo的时候全部都搞完了,访问发现nginx 报403 forbidden 查看了nginx的log日志 日志信息记录如下: *481 directory index of "/home/www/hexo/" is forbidden~~~~~~ 解决:去nginx conf目录下 阅读全文
posted @ 2022-01-11 17:34 ジ绯色月下ぎ 阅读(4380) 评论(0) 推荐(0) 编辑
摘要: 说明:用的Oracle 11g 数据库 最近在做的一个需求,版权信息要保存到数据库中,“CopyRight©****公司” 而保存到数据库就变成了“CopyRight?****公司”, 版权字段类型用的是VARCHAR2、CLOB 都试过了,还是变成问号。于是网上找了一下,解决了这个问题。 1. 把 阅读全文
posted @ 2021-12-29 10:48 ジ绯色月下ぎ 阅读(2972) 评论(0) 推荐(0) 编辑
摘要: 之前活动的时候搞了一台aliyun ecs centos7 1核1G的,闲着也是闲着 搭建一下云盘下面开始操作: 1、下载压缩包cloudreve_3.4.2_linux_amd64.tar.gz 地址:https://github.com/cloudreve/Cloudreve/releases 阅读全文
posted @ 2021-12-07 10:58 ジ绯色月下ぎ 阅读(603) 评论(0) 推荐(0) 编辑
摘要: 在properties中增加如下配置 <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> 若不 阅读全文
posted @ 2021-11-24 09:35 ジ绯色月下ぎ 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 说明:业务开发过程中经常遇到需要对接第三方接口获取第三方结果,当遇到网络问题调用失败的时候,需要去重试调用。而spring-retry就提供了这样的支持 依赖: <dependency> <groupId>org.springframework.retry</groupId> <artifactId 阅读全文
posted @ 2021-11-14 15:44 ジ绯色月下ぎ 阅读(523) 评论(0) 推荐(0) 编辑
摘要: 简介:需求是根据登录时间和当前时间是否超过24小时,来进行业务操作, 因此需要计算时间之差来进行判断。 代码如下: public static String getDateDiscrepency(Date endDate, Date nowDate) { long nd = 1000 * 24 * 阅读全文
posted @ 2021-11-14 14:35 ジ绯色月下ぎ 阅读(588) 评论(0) 推荐(0) 编辑
摘要: 1.1 List集合拼接成以逗号分隔的字符串 // 如何把list集合拼接成以逗号分隔的字符串 a,b,cList<String> list = Arrays.asList("a", "b", "c");// 第一种方法,可以用stream流String join = list.stream().c 阅读全文
posted @ 2021-11-10 19:22 ジ绯色月下ぎ 阅读(9331) 评论(0) 推荐(0) 编辑
摘要: 依赖: <dependency> <groupId>net.coobird</groupId> <artifactId>thumbnailator</artifactId> <version>0.4.7</version> </dependency> 代码: //realPath是保存到的目标地址 阅读全文
posted @ 2021-11-09 17:08 ジ绯色月下ぎ 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 本地启动出错Unable to start ServletWebServerApplicationContext due to miss ServletWebServerFactory bean 解决:注释掉内置的tomcat的scope 阅读全文
posted @ 2021-11-09 10:02 ジ绯色月下ぎ 阅读(232) 评论(0) 推荐(0) 编辑
摘要: trim可以去除sql语句中多余的and关键字,逗号,或者给sql语句前拼接 “where“、“set“以及“values(“ 等前缀,或者添加“)“等后缀,可用于选择性插入、更新、删除或者条件查询等操作。 <update id="update" parameterType="Product"> u 阅读全文
posted @ 2021-09-08 16:09 ジ绯色月下ぎ 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 说明:老项目,使用的是spring 3项目,需要对接RocketMQ,配置完之后,在消费者监听方法中,发现业务处理service注入不进来,最后检查发现是因为消费者监听工具类没有被正确的初始化,所以它里边的业务service注入之后是个null,于是各种折腾,特此记录一下 方式一: 解决:对需要初始 阅读全文
posted @ 2021-09-05 12:32 ジ绯色月下ぎ 阅读(483) 评论(0) 推荐(0) 编辑
摘要: springboot项目启动之后,需要初始化一下自定义的工具类,记录一下 import xxx.util.RocketMqConsumerUtil; import org.springframework.beans.factory.annotation.Autowired; import org.s 阅读全文
posted @ 2021-09-02 17:30 ジ绯色月下ぎ 阅读(283) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 12 下一页