上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 34 下一页
摘要: 1.failFast (ArrayList) 一旦发现遍历的同时其他人来修改,则立即抛异常。 当执行一个遍历时,另一个线程修改了遍历的数据,则会立即抛出ConcurrentModificationException(并发修改异常)。 实现原理:记录了循环开始时的次数,如果在循环的过程中修改次数被改, 阅读全文
posted @ 2022-08-22 11:36 临易 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 如果调用无参arrayList构造方法,则初始长度为0; 如果构造带参的构造方法,则初始容量为指定长度。 1.调用add()方法 1.第一次扩容为10(从0到9)。 2.后续扩容都是前一次的1.5倍(创建一个新数组(0-14),将旧数组的元素拷贝到新数组中去,用新数组代替旧数组,旧数组没有被引用,作 阅读全文
posted @ 2022-08-22 10:24 临易 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1.一般(默认格式): 格式:星期 月份 日期 时:分:秒 时区 年份 Thu Aug 11 15:19:59 CST 2022 2.simpleDateFormat格式化date类: import java.text.SimpleDateFormat; import java.util.Date; 阅读全文
posted @ 2022-08-11 15:47 临易 阅读(1971) 评论(0) 推荐(0) 编辑
摘要: 1.将api中的WXPay依赖移至service的pom.xml中。 2.OrderService: public interface OrderService { public Map<String,String> addOrder(String cids, Orders order) throw 阅读全文
posted @ 2022-08-09 19:32 临易 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 具体代码: index.html: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>字母消消乐</title> <link rel="stylesheet" href="css/game.css" /> </head> <b 阅读全文
posted @ 2022-08-03 22:16 临易 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 订单超时取消:当用户成功提交订单之后在规定时间内如果没有完成支付,则将订单关闭,还原库存。 实现订单的超时取消通常有两种解决方案: 1.使用定时任务(循环扫描)(quartz) 2.延时队列(MQ) 一、流程分析 二、实现 1.在service中的pom.xml中添加定时任务依赖: <depende 阅读全文
posted @ 2022-08-02 20:43 临易 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 完整日志: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project api: There are test failures. Please 阅读全文
posted @ 2022-08-01 11:35 临易 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1.创建新的springboot项目 2.导入依赖 删除多余文件 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-quartz</artifactId> </depend 阅读全文
posted @ 2022-07-31 19:02 临易 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1.引入依赖 <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-websocket --> <dependency> <groupId>org.springframework.bo 阅读全文
posted @ 2022-07-31 18:12 临易 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 一、流程分析 二、接口实现 OrderService: public interface OrderService { public Map<String,String> addOrder(String cids, Orders order) throws SQLException; public 阅读全文
posted @ 2022-07-31 16:21 临易 阅读(82) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 34 下一页