![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
xiaoxiaowuyan
知识改变命运
展开
-
Java int byte 之间的相互转换
int转byte[]本文通过大端序的方式进行转换 private byte[] intToByte(int num) { byte[] bytes = new byte[4]; bytes[0] = (byte) ((num >> 24) & 0xff); bytes[1] = (byte) ((num >>...原创 2019-09-17 14:45:10 · 266 阅读 · 0 评论 -
jdbc com.alibaba.druid.pool 连接mysql8.0错误解决办法 (com.mysql.cj.jdbc.exceptions.CommunicationsException)
错误 The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicati...原创 2019-08-10 16:44:48 · 3943 阅读 · 1 评论 -
springboot mongodb连接认证失败
com.mongodb.MongoCommandException: Command failed with error 13 (Unauthorized): 'command insert requires authentication' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "comma...原创 2019-08-13 21:11:55 · 10990 阅读 · 1 评论 -
java MongoDB直接存pojo类
Pojo实体UserFaceCollection.javaimport lombok.Data;import java.io.Serializable;import java.util.Date;@Datapublic class UserFaceCollection implements Serializable { private static final long...原创 2019-08-13 19:31:16 · 1021 阅读 · 2 评论