- 博客(8)
- 收藏
- 关注
转载 基于springboot的jooq配置及使用,scala版
1.配置依赖及jooq类生成脚本(配置build.gradle) 脚本依赖 buildscript { ext { springBootVersion = '1.5.4.RELEASE' } repositories { mavenC...
2018-02-05 15:46:00 294
转载 基于springboot的redis配置及使用,scala版
1.主配置文件application.properties spring.redis.database = 4spring.redis.host =192.168.31.97spring.redis.password = foobaredspring.redis.port = 6379...
2018-02-05 13:36:00 179
转载 kafka的简单用例
首先,我们需要配置好kafka的依赖及客户端必要参数(有关服务器的配置,我会在另一篇博客里介绍)。 1.加入kafka依赖 //kafkacompile ('org.springframework.kafka:spring-kafka') 2.配置kafka的相关参数 /*kafk...
2018-01-25 08:42:00 173
转载 删除ArrayList中的元素
错误方法1,原本想删除所有>= threshold的值,但是会漏删一些元素,达不到想要的效果 public static List<Integer> filterUnderThreshold(final List<Integer> values, final i...
2018-01-17 18:48:00 128
转载 一道关于泛型的题目
先看题目: public class Mocker<T extends Exception> { private void pleaseThrow(final Exception t) throws T { throw (T) t; } ...
2018-01-17 14:18:00 86
转载 一道关于static的有趣题目
现有3个类 public class A { public static int b = B.a; public static A plus = new A("A"); public static final int finalInt = (int) (Math.ra...
2018-01-17 10:00:00 73
转载 Java调用C函数(dll或so)
1.首先要在项目中加入jna依赖 compile group: 'net.java.dev.jna', name: 'jna', version: '4.5.0' 使用jna的优点是,我们不用了解C函数的实现,也不用写任何的C语言代码,就能调用到C函数。 2.写一个继承com.sun.j...
2018-01-16 19:02:00 141
转载 Centos7 配置ftp传输文件
一.安装vsftpd 1.查看是否已经安装vsftpd 输入 rpm -qa | grep vsftpd 如果没有装,则不会显示任何信息 2.用yum命令安装vsftpd,并设置开机启动。我的服务器python版本为2.7.5,python3.5.0以上版本命令可能不同 yum -...
2018-01-16 18:22:00 553
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人