上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页
摘要: @Slf4j可以省略private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LogExample.class); 可以直接使用log变量打印info级别以上的的日志,debug默认不打印; log变量 阅读全文
posted @ 2019-08-28 11:42 宇枫 阅读(5297) 评论(0) 推荐(0) 编辑
摘要: 线程中无法直接使用注解的方式获取spring beans,但是线程经常需要用到bean来实现业务流程;这里有两种方式方法1:是通过初始化线程实现类的方式通过set私有属性,把bean赋值到线程实现类中; 方法2:通过applicationcontext线程中直接获取bean; 以往的spring则是 阅读全文
posted @ 2019-08-26 15:54 宇枫 阅读(2819) 评论(0) 推荐(0) 编辑
摘要: 检查pom依赖后确认junit的jar包, 尽管查看maven依赖里面有jar包,但是,jar包的颜色是灰色的,并且编译时报错:The import org.junit cannot be resolved 原因是<scope>test</scope>含义是依赖项目仅仅参与测试相关的工作,包括测试代 阅读全文
posted @ 2019-08-26 14:27 宇枫 阅读(4080) 评论(0) 推荐(0) 编辑
摘要: 假设二叉树如图: 阅读全文
posted @ 2019-08-20 20:11 宇枫 阅读(2504) 评论(0) 推荐(0) 编辑
摘要: import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io... 阅读全文
posted @ 2019-08-15 16:46 宇枫 阅读(1851) 评论(0) 推荐(0) 编辑
摘要: 1.计算图片是否存在本图库:前中后各取100个字节拼在一起进行哈希计算,通过计算后的值来对比图片是否存在,找到匹配的图片在精确对比;2.数据加密3.数据校验,例如电影大文件下载校验 阅读全文
posted @ 2019-08-02 10:22 宇枫 阅读(249) 评论(0) 推荐(0) 编辑
摘要: public static int bsearch(int[] a, int n, int value) {//a是查找目标数组,n是数组长度,value是查找的值 int low = 0; int high = n - 1; while (low <= high) { int mid = (low + high) / 2; ... 阅读全文
posted @ 2019-07-03 16:59 宇枫 阅读(888) 评论(0) 推荐(0) 编辑
摘要: public class ReversStack { class Node { private U itemValue; //结点的值 private Node nextItem; //下一个节点地址 Node() { itemValue = null; nextItem = null;... 阅读全文
posted @ 2019-06-06 18:03 宇枫 阅读(482) 评论(0) 推荐(0) 编辑
摘要: public static List> threeSum(int[] nums) { List> results = new ArrayList(); if (nums == null || nums.length 0 && nums[i] == nums[i - 1]) { continue; ... 阅读全文
posted @ 2019-05-30 17:15 宇枫 阅读(600) 评论(0) 推荐(0) 编辑
摘要: 目标:创建自定义注解,实现切面编程 首先在pom文件加入: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency> 阅读全文
posted @ 2019-05-08 17:23 宇枫 阅读(3321) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页