/**
* 判断字符串是否为数字
*
* @param str String
* @return Boolean
*/
public static Boolean isNumeric(String str) {
//?:0或1个, *:0或多个, +:1或多个 支持判断正负、整数小数
return str.matches("-?[0-9]+.?[0-9]*");
}
java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51)
出现这种问题,一般有以下几种情况
- 客户端请求服务器数据,服务器突然挂了
- 客户端请求服务端数据,服务端返回正常。但客户端由于连接超时或者其他原因断开导致服务端无法返回通道导致
通过traceid找到这个异常导致的下一个异常
java.io.IOException: UT010029: Stream is closed
at io.undertow.servlet.spec.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:138)
这个就很明显了是第二中情况,客户端问题导致了Stream is closed
- alibaba java coding guidelines
- atom material icons
- gitToolBox
- key promoter x
- material theme ui
- tabnine ai code completion
- translation
- lombok
- Nyan Progress Bar
public static Boolean isUrl(String url) { try { new URL(url); return true; } catch (MalformedURLException e) { return false; } }
这种Jpa的错误查找错误出处,错误详情如下
ERROR [12:01:12.102] [1da1d72f575b4f95af5e0cdde8b114e1] [192847] [1] [] [100] [2.28.1] [o.h.e.jdbc.spi.SqlExceptionHelper – logExceptions – 142] – Table ‘tp.video’ doesn’t exist
ERROR [12:01:12.107] [1da1d72f575b4f95af5e0cdde8b114e1] [192847] [1] [] [100] [2.28.1] [c.y.m.c.b.util.RestBusinessTemplate – doExecuteWithoutTransaction – 79] – execute error x
org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
重点:
ERROR [12:01:12.102] [1da1d72f575b4f95af5e0cdde8b114e1] [192847] [1] [] [100] [2.28.1] [o.h.e.jdbc.spi.SqlExceptionHelper – logExceptions – 142] – Table ‘tp.video’ doesn’t exist
有的时候是字段对不上,有的时候是表不存在,直接创建即可