自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 收藏
  • 关注

原创 git安装配置及使用

1.下载地址git下载地址win操作maclinux2.初始化配置 git config –-global user.name ‘账号’ git config –-global user.email ‘邮箱’ ssh-keygen -t rsa -C '邮箱' 注:此命令用于配置git使用ssh下载,不需要其他输入具体配置3.操作指令...

2019-08-09 14:35:09 147

转载 关于org.apache.http包中的HttpClient报错问题

转:https://blog.csdn.net/u014740342/article/details/53057200          在前一段时间工作中接触到了HttpClient,之前都没听过,也就不知道怎么使用,是同事帮忙把相关的内容写出来,我才知道怎么使用能实现从网站中拿到想要的数据。      &nbs...

2019-07-26 15:09:10 1094 1

转载 centos7 rpm安装mysql

0、环境本文操作系统: CentOS 7.2.1511 x86_64MySQL 版本: 5.7.161、卸载系统自带的 mariadb-lib[root@centos-linux ~]# rpm -qa|grep mariadb mariadb-libs-5.5.44-2.el7.centos.x86_64 [root@centos-linux ~]# rpm -e mariadb-l...

2019-07-25 16:41:14 190

原创 自定义字段验证

1.定义@interfacepackage com.jwt.jwt.inter;import javax.validation.Constraint;import javax.validation.Payload;import java.lang.annotation.Documented;import java.lang.annotation.Retention;import j...

2019-07-19 10:08:31 163

转载 获取本机ip

public InetAddress getLocalHostLANAddress() throws Exception { try { InetAddress candidateAddress = null; // 遍历所有的网络接口 for (Enumeration ifaces = NetworkInterface.getNetwork...

2019-07-05 10:03:55 106

原创 springboot 整合阿里 Druid 数据库连接池

pom配置<dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.0.20</version> ...

2019-07-03 15:30:29 403

转载 启动ActiveMQ异常:java.net.URISyntaxException: Illegal character in hostname at index解决办法

首先,我要吐槽一下网上对于这个问题的解决方案,抄过来抄过去都一个样,连正确性都不测试一下......首先翻译一下这个异常,就是:主机名中包含非法字符,那么非法字符是什么呢?是“_”下划线;那么解决办法就很简单了,改主机名:1、方法一使用hostnamectl命令hostnamectl set-hostname  主机名2、方法二:修改配置...

2019-07-01 11:45:50 1166

原创 MappedByteBuffer 高效读写文件

private static final int start = 0; public static void main(String[] args) throws IOException { RandomAccessFile raf = new RandomAccessFile("D:/mapper.txt", "rw"); FileChannel...

2019-06-20 16:18:33 4802 1

原创 获取集合中某个元素的上一个元素

List<String> list = new ArrayList<>(); list.add("001"); list.add("005"); list.add("003"); list.add("002"); list.add("004"); SortedSet<Str...

2019-06-17 09:55:09 2589

转载 curator实现分布式锁

转https://blog.csdn.net/liyiming2017/article/details/83896169 [转自](https://blog.csdn.net/liyiming2017/article/details/83896169)目录:zookeeper介绍与核心概念 安装和使用 ZooKeeper分布式锁实现 Zo...

2019-06-06 11:02:32 398

原创 curator操作zookeeper

<dependency> <groupId>org.apache.curator</groupId> <artifactId>curator-framework</artifactId> <version>2.11.0</version> ...

2019-06-03 11:49:31 85

原创 java序列化&反序列化

public static void seria(){ try { ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File("person"))); Person person = new Person(); ...

2019-05-28 15:30:44 83

原创 java8根据两个字段排序(一正序一倒叙)

List<Student> collect2 = list.stream() .sorted(Comparator.comparing(Student::getAge).reversed().thenComparing(Student::getScore)) .collect(Collectors.toList());

2019-04-24 16:39:21 13035

转载 搭建Maven私服

https://blog.csdn.net/sdksdk0/article/details/52190619

2019-04-18 14:55:52 75

原创 mvn控制不同的发布环境

项目目录pom配置在主pom中添加 <profiles> <profile> <id>dev</id> <properties> <profiles.active>dev</profiles.activ...

2019-04-18 11:02:15 159

原创 mvn插件

spotbugs 代码检查 <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> <vers...

2019-04-17 17:32:18 204

原创 设置linux在内存不足的时候,不会自动杀进程

cat /proc/version,查看linux内核版本如果linux内核版本&lt;3.5,那么swapiness设置为0,这样系统宁愿swap也不会oom killer(杀掉进程)如果linux内核版本&gt;=3.5,那么swapiness设置为1,这样系统宁愿swap也不会oom killerecho 0 &gt; /proc/sys/vm/swappinessecho vm.s...

2019-02-20 11:23:28 4074

转载 java 对文件内容进行替换工作

读取文件代码如下: File file = new File("C:/Users/Administrator/Desktop/test1.json"); try { String content = FileUtils.readFileToString(file, "utf-8"); System...

2019-01-23 10:38:02 750

原创 使用多线程处理逻辑

@GetMapping("/order")public Callable order(){Callable callable = new Callable() {@Overridepublic UserTest call() throws Exception {logger.info(“副线程开始”);Thread.sleep(1000);UserTest usr = new Use...

2019-01-23 10:10:32 263

原创 获取()内的字符串

获取()内的字符串 Pattern pattern = Pattern.compile("(?&lt;=\\()(.+?)(?=\\))"); Matcher matcher = pattern.matcher(匹配的内容); while(matcher.find()){ 字符串= matcher.group(); }...

2018-12-21 13:16:15 242

转载 mysql安装

第一步:获取mysql YUM源进入mysql官网获取RPM包下载地址https://dev.mysql.com/downloads/repo/yum/  点击 下载  右击 复制链接地址 https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm 得到这个  这个就是Y...

2018-11-28 16:52:08 99

转载 Mybatis数据库连接报错:对实体 "characterEncoding" 的引用必须以 ';' 分隔符结尾

Mybatis数据库连接报错:对实体 "characterEncoding" 的引用必须以 ';' 分隔符结尾一、问题描述Java代码  Exception in thread "main" org.mybatis.generator.exception.XMLParserException: XML Parser Error on line 17: 对实体 "characterEnc...

2018-11-14 17:51:23 244

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除