上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 37 下一页
摘要: MySql explain语句的返回结果中,filtered字段要怎么理解? MySql5.7官方文档中描述如下: The filtered column indicates an estimated percentage of table rows filtered by the table co 阅读全文
posted @ 2022-04-14 15:33 浅笑19 阅读(1817) 评论(0) 推荐(2) 编辑
摘要: 阿里巴巴的开源数据库连接池工具Druid数据源,在实际使用的时候,通常会和Spring或SpringBoot整合一起使用。 但有些时候如果不用使用Spring或SpringBoot,而直接使用Druid的原生API来操作数据库的话,该如何正确使用呢? 下面是一个使用Druid连接池简单操作数据库的工 阅读全文
posted @ 2022-04-10 23:19 浅笑19 阅读(519) 评论(0) 推荐(0) 编辑
摘要: 操作的mongodb 版本号: 5.0.6 常用操作如下: // 原子操作 db.col2.findAndModify({ query: { _id: ObjectId('623f547d6ac6657eff566709') // available: {$gt: 0} }, update: { $ 阅读全文
posted @ 2022-03-27 21:46 浅笑19 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 更新单条记录 UPDATE course SET name = 'course1' WHERE id = 'id1'; 更新多条记录的同一个字段为同一个值 UPDATE course SET name = 'course1' WHERE id in ('id1', 'id2', 'id3); 更新多 阅读全文
posted @ 2022-03-22 18:21 浅笑19 阅读(4259) 评论(0) 推荐(0) 编辑
摘要: 在使用BigDecimal除法方法divide()时,如果处理不当代码会报异常 import java.math.BigDecimal; public class BigDecimalTest { public static void main(String[] args) { BigDecimal 阅读全文
posted @ 2022-03-15 19:34 浅笑19 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 1. 通过类对象调用newInstance()方法,适用于无参构造方法: 例如:String.class.newInstance() 2. 通过类对象的getConstructor()或getDeclaredConstructor()方法获得构造器(Constructor) 对象并调用其newIns 阅读全文
posted @ 2022-03-12 13:33 浅笑19 阅读(73) 评论(0) 推荐(0) 编辑
摘要: pom引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> </dependency> 代码 package org.qx. 阅读全文
posted @ 2022-03-12 13:23 浅笑19 阅读(518) 评论(0) 推荐(0) 编辑
摘要: 3.4.0之前分页 /*@Intercepts(value = {@Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class})})*/ //3.40之前的写法 3.4.0之后分页 @I 阅读全文
posted @ 2022-01-22 20:42 浅笑19 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 阿里巴巴的druid数据源 <!-- 配置数据源 使用的是Druid数据源 --> -<bean destroy-method="close" init-method="init" class="com.alibaba.druid.pool.DruidDataSource" name="dataSo 阅读全文
posted @ 2022-01-22 19:31 浅笑19 阅读(422) 评论(0) 推荐(0) 编辑
摘要: pom <!-- Mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.2.8</version> </dependency> <dependency> 阅读全文
posted @ 2022-01-22 19:04 浅笑19 阅读(368) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 37 下一页