
常见异常
极简之美
这个作者很懒,什么都没留下…
展开
-
Arrays.asList() 不能被修改 包括add 及iterator.remove()
这里写自定义目录标题1、add()方法,直接源码截图Arrays.asList() 创建是Arrays内部类,并没有重写 add() 方法,所以会调用到AbstractList类的 add方法,public void add(int index, E element) { throw new UnsupportedOperationException();}2、iterator.remove,也要注意,Arrays内部类的没有实现 iterator()方法,调用父类同样是直接抛出Uns原创 2020-05-13 09:57:19 · 298 阅读 · 0 评论 -
spring boot 异常1:HttpMessageNotWritableException: No converter found for return value of type: class
Resolved [org.springframework.http.converter.HttpMessageNotWritableException: No converter found for return value of type: class xxx1.实体getter/setter是否添加(一般是这种情况)其他情况2.实体是否有其他构造方法时,要有空构建方法3.实体需要实现...原创 2020-02-28 09:34:39 · 1353 阅读 · 0 评论