问题,为了方便调试,引入了swagger2,但是在第一次访问的时候总是报 让人看着很不输入 定位问题 很明显说是 ,查看AbstractSerializableParameter的getExample得知 在进行转化的时候报错,在 判断的不对。 解决 方式1 修改源码 将源码下载下来,进行编辑,把判 ...
分类:
其他好文 时间:
2020-03-18 11:26:43
阅读次数:
43
Given an array of integers and an integer k, you need to find the minimum size of continuous subarrays whose sum equals to k, and return its length. i ...
分类:
其他好文 时间:
2020-03-18 09:33:00
阅读次数:
42
首先导入springboot 的 web 包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> restTem ...
分类:
编程语言 时间:
2020-03-17 21:07:32
阅读次数:
73
类型通配符 如果Sub是Par的一个子类型(子类或子接口),而G是具有泛型声明的类或接口,G并不是G的子类型! 在早期的Java中,允许Integer[]数组赋值给Number[]变量存在着缺陷: 因此,Java在泛型设计时进行了改进,它不再允许把List对象赋给List变量: Java泛型的设计原 ...
分类:
其他好文 时间:
2020-03-17 19:37:55
阅读次数:
88
假设堆中存int类型的数据,直接一波PriorityQueue<Integer> queue = new PriorityQueue<>();即可完成小顶堆的构建,直接A了,因为默认的用new创建优先队列对象为小顶堆。 但是如何完成大顶堆的构建呢? 先介绍一种简洁的写法,利用lambda表达式来操作 ...
分类:
其他好文 时间:
2020-03-17 19:20:54
阅读次数:
140
来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/roman-to-integer 罗马数字包含以下七种字符: I, V, X, L,C,D 和 M。 字符 数值I 1V 5X 10L 50C 100D 500M 1000例如, 罗马数字 2 写做 ...
分类:
其他好文 时间:
2020-03-17 16:46:09
阅读次数:
45
Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 x 4. Write a function that takes an integer n and return all possib ...
分类:
其他好文 时间:
2020-03-17 10:23:21
阅读次数:
66
0-100求和:class MyTask extends RecursiveTask<Integer>{ public static final int ADJAST_VALUE = 10; private int begin; private int end; private int result ...
分类:
其他好文 时间:
2020-03-16 23:31:24
阅读次数:
67
Java内置了API: Integer.toBinaryString(); 先看源码是怎么写的 java public static int numberOfLeadingZeros(int i) { // HD, Figure 5 6 if (i == 0) return 32; int n = ...
分类:
其他好文 时间:
2020-03-16 19:09:21
阅读次数:
92
/** * Log any invocation timeout, but don't stop server from running * 服务于服务提供者 */ @Activate(group = Constants.PROVIDER) public class TimeoutFilter im ...
分类:
其他好文 时间:
2020-03-16 17:34:03
阅读次数:
56