在使用java.util.List; 的时候,把语句写成了: List<Integer> arr = new List<Integer>(); 导致错误: Cannot instantiate the type List<Integer> 正确写法是: List<Integer> arr = new ArrayList<Integer>();…
题记:以前记录过一些自己遇到的BUG,这个行为,让我一看报错的提示信息就能定位到问题的所在,后来记得比较多了,好多是重复性的再加上比较忙就没有详细的记录了,今天的工作量比较小,就顺便记录一下,以便以后更快的解决此类问题. BUG的报错信息如下所示: org.springframework.dao.InvalidDataAccessApiUsageException: Parameter value [41] did not match expected type [java.lang.Integ…
今天在使用Spring Template的时候遇到了这个异常: no suitable HttpMessageConverter found for request type [java.lang.Integer] Google了一下然后在stackoverflow上面找到了解决方案: I have a method in Spring rest service. @RequestMapping(value = "test/process", method = RequestMetho…
看自己动手写爬虫,没想到一上来就跪了. 里面提到用的jar包是apache的http客户端开源项目---HttpClient 就去官网下载了一个版本4.3 当按书上代码敲时 HttpClient httpclient = new HttpClient(); 敲完这句,就给跪了 提示Cannot instantiate the type HttpClient, google 了下,在stackoverflow上面说是应该 HttpClient httpclient = new DefaultHtt…
使用hibernate时,在save方法时,报了:org.hibernate.validator.constraints.NotBlank' validating type 'java.lang.Integer,因为@NotBlank是针对String的   . 解决方法是将实体类的注解换成     @NotNull,就行了, 替换前 替换后…
=============================================== 2019/1/30_第1次修改                       ccb_warlock =============================================== 由于开发团队搭建的ELK存在些无法解决的问题,故我选择重新搭了新的ELK来替换有问题的ELK. 在使用了elasticdump迁移数据(5.4.X -> 5.6.14)后,访问kibana看到了报错信息"…
controller层返回值类型为Integer,运行报错: Unknown return value type: java.lang.Integer 解决办法:在此方法上写上注解 @ResponseBody . @responseBody注解的使用 1. @responseBody注解的作用是将controller的方法返回的对象通过适当的转换器转换为指定的格式之后,写入到response对象的body区,通常用来返回JSON数据或者是XML 数据,需要注意的呢,在使用此注解之后不会再走试图处…
controller层返回值类型为Integer,然而报 Unknown return value type: java.lang.Integer 这个错误,500错误 解决办法:在此方法上写上注解@ResponseBody…
javax.validation.UnexpectedTypeException: HV000030: No validator could be found for constraint 'javax.validation.constraints.Pattern' validating type 'java.lang.Integer'. Check configuration for 'sortType' at org.hibernate.validator.internal.engine.c…
今天在使用Map中犯了个低级错误,记录一下: 打算使用map为一个视频List观看记录的统计标识,key为vid,value默认为false,当该key已经统计,标识value为true,初始实例化Map代码如下: Map<String, Boolean> vListMap= new Map<String, Boolean>(); 报错:Cannot instantiate the type Map 查看Map的定义,public abstract interface java.u…