07 2020 档案
摘要:String path="D:\\新建文件夹\\2.png"; File file=new File(path); System.out.println(file.exists()); String path1="D:/新建文件夹/2.png"; File file1=new File(path);
阅读全文
摘要:java SASL_SSL 帐号密码 方式访问 kafka Producer Java Sample java生产者: Properties props = new Properties();props.put("bootstrap.servers", "*******:9092,*******:9
阅读全文
摘要:介绍 对于某些特殊需求:得到刚刚插入数据的主键值,以便对刚刚生成的数据做处理 那么,如何得到刚插入的主键值呢有两种大的方向。 第一是在数据库获得通过自带方法。在数据插入之后输入“select @@indentity”通常需要结合存储过程,比较复杂。 第二是在后台插入时获得。这里我们主要说后台刚插入时
阅读全文
摘要:分三步: 1:申请 账号,密码 2:得到token 3:使用token,调用api 2 得到token public String getToken() { String token = ""; String authorization = new BASE64Encoder().encode((c
阅读全文
摘要:Exception in thread "main" org.dbunit.dataset.DataSetException: java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.
阅读全文
摘要:okhttp3.FormBody instead of FormEncodingBuilder.(OkHttp3.x,FormEncodingBuilder已被FormBody取代) OkHttpClient client = new OkHttpClient();FormBody body = n
阅读全文
摘要:[1.0]:x == 1.0 1.0的版本 [1.0,):x >= 1.0 大于等于1.0的版本 (1.0,):x > 1.0 大于1.0的版本 e.g <dependency> <groupId>org.twitter4j</groupId> <artifactId>twitter4j-core<
阅读全文
摘要:Integer totalSeller = facilitatorVos.stream().map(FacilitatorVo::getSellerNum).reduce(0, Integer::sum); BigDecimal totalTransaction = facilitatorVos.s
阅读全文
摘要:对于用vs作为开发工具的同学来说,可能常常会碰到“Lc.exe已退出 代码为-1”的问题,造成这个结果的一般是因为加入了第三方的插件程序造成的,今天一一讲解如何解决。 工具/原料 vs各版本开发工具 方法/步骤 1 在多人进行程序开发的过程中,可能由于版本问题,会导致“Lc.exe已退出 代码为-1
阅读全文
摘要:import com.fasterxml.jackson.core.JsonParser;import com.fasterxml.jackson.databind.DeserializationContext;import com.fasterxml.jackson.databind.JsonDe
阅读全文
摘要:静态构造函数是在构造函数方法前面添加了static关键字之后形成的,并且没有修饰符(public,private),没有参数。 特点:1、静态构造函数没有修饰符修饰(public,private),因为静态构造函数不是我们程序员调用的,是由.net 框架在合适的时机调用的。 2、静态构造函数没有参数
阅读全文
摘要:C#两大知名Redis客户端连接哨兵集群的姿势 前言 前面利用《Docker-Compose搭建Redis高可用哨兵集群》,我们的思路是将Redis、Sentinel、Redis Client App链接到同一个网桥网络,这个网桥内的Redis Client App就可以使用ContainerIP访
阅读全文
摘要:一、字符串类型 类型 范围 说明 Char(N) [ binary] N=1~255 个字节binary :分辨大小写 固定长度 std_name cahr(32) not null VarChar(N) [binary] N=1~255 个字节binary :分辨大小写 可变长度 std_addr
阅读全文
摘要:今天创建mysql表时,遇到了[Err] 1118 - Row size too large的问题,sql如下:drop table if exists Orders;create table Orders( orderNo varchar(50) not null comment '订单号', i
阅读全文
摘要:@PropertySource只对properties文件可以进行加载,但对于yml或者yaml不能支持。追寻源码。 public class DefaultPropertySourceFactory implements PropertySourceFactory { public Default
阅读全文
摘要:这几天在学习springboot的微服务项目,在配置文件方面也想尝试下新的yml配置,就想把原来项目properties写的文件转换成yml试一下(老项目是之前检出在了Myeclipse里面),结果写好了yml配置文件,项目启动时候报了如下错误: Exception in thread "main"
阅读全文