
javaEE
雨夜星辰03
学无止境
展开
-
请求后台 Unexpected EOF read on the socket
APP请求后端接口,莫名奇妙报错,前往后台查看日志还行报了下面的错误02-03 23:52:37.853 ERROR [o.a.c.c.C.[.[localhost].[/].[dispatcherServlet]] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.原创 2021-02-04 09:16:11 · 4797 阅读 · 1 评论 -
apache lucene7.0几种常用的查询条件构造方式
官方文档:https://lucene.apache.org/core/7_1_0/core/org/apache/lucene/search/package-summary.html#search1.通过QueryParser构造查询单条件条件 QueryParser queryParser = new QueryParser("courseName", analyzer);原创 2017-11-24 18:07:14 · 874 阅读 · 0 评论 -
Lucene简单文件夹索引和查询案例
使用的是apache Lucene7.0 ,jdk 8.01.遍历文件夹建立索引package com.kyd.demo.standardAnaly;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader原创 2017-11-28 13:37:31 · 616 阅读 · 0 评论 -
ElasticSearch使用ik中文分词器集成html_strip网页标签过滤器
绝招就是使用自定义分析器可以参考官方文档 https://www.elastic.co/guide/en/elasticsearch/reference/5.6/analysis-custom-analyzer.htmltokenizerA built-in or customised tokenizer. (Required) 这个参数是必须的,分词令牌char_filterAn opti...原创 2018-05-25 18:33:41 · 4999 阅读 · 1 评论 -
(二)ElasticSearch-system-api
1.cluster health 集群健康状态get _cat/health?vstatus:grenn(至少有一个主节点和一个副本节点在运行), yellow(只有一个节点在运行),red(危险故障状态)2.nodes status 节点状态get _cat/nodes?v3.list all indices 展示所有索引get _cat/indices?v4.create an index...原创 2018-06-11 20:25:33 · 226 阅读 · 0 评论 -
(一)ElasticSearch-Basic Concepts
之前项目需要零零碎碎学习了一些ElasticSearch的知识,但是最近项目遇到瓶颈,搜索不准确,速度不高!需要进一步优化!为此,重新好好看看ElasticSearch的知识!1.cluster 集群 由许多节点node组合而成,区分唯一的集群是根据集群的名字(unique name)来区分的! 集群可以使用以下三种阶段logging-dev,logging-stage,loggi...原创 2018-06-11 15:17:33 · 311 阅读 · 0 评论 -
struts2中s:hidden标签放在td或者th标签中导致网页排版错乱
<table> <tr> <td> <form> <table> <tr> <td> 内原创 2018-06-13 14:36:50 · 639 阅读 · 1 评论 -
Tomcat8.5 优化配置
server.xml优化配置<?xml version="1.0" encoding="UTF-8"?><!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file...原创 2018-12-07 12:53:59 · 2047 阅读 · 0 评论 -
log4j2.xsml配置文件详细
<?xml version="1.0" encoding="UTF-8"?><configuration status="OFF" monitorInterval="30"> <!-- status="OFF",可以去掉,它的含义为是否记录log4j2本身的event信息,默认是OFF --> &l原创 2019-03-14 11:40:30 · 821 阅读 · 0 评论 -
ElasticSearch6.0配置HanLP分词器
1.HanLP分词器插件下载地址https://github.com/pengcong90/elasticsearch-analysis-hanlp/releases下载analysis-hanlp.zip2.解压到ElasticSearch下plugins目录下3.配置修改analysis-hanlp目录下的hanlp.properties文件,修改root的原创 2017-11-30 18:02:24 · 2195 阅读 · 2 评论 -
ElasticSearch基础教程
整理自http://blog.youkuaiyun.com/cnweike/article/details/33736429 Elasticsearch有几个核心概念。从一开始理解这些概念会对整个学习过程有莫大的帮助。参考官方文档 https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started.ht转载 2017-11-30 18:00:12 · 344 阅读 · 0 评论 -
File取得父目录的误区
今天做一个File的Demo的时候,新建文件时,假如父目录不存在会报错!这时我加了一个判断,在创建文件之前判断父目录是否存在if(file.getParentFile()==null){file.getParentFile().mkdirs();}用了上面的代码发现没用,上面代码是我查了文档以后写的上面是中文文档我又查看了英文文档原创 2017-02-23 14:43:23 · 1312 阅读 · 1 评论 -
Eclipse/MyEclipse选择jdk时出现了jdk和jre有什么区别?
最近在使用eclipse的过程中选择jdk时出现了jdk和jre查阅资料 jdk主要面对研发 jre主要是运行时用的开发的时候最好还是选jdk原创 2017-02-25 09:49:29 · 924 阅读 · 0 评论 -
jquery-weui-1.0.1弹出popup层多次点击以后无法弹出层解决方法
最近用jquery-weui做手机页面,发现popup层弹出多次以后点击无法弹出层了,进入假死卡死状态,调试发现在每次弹出popup层之前调用了一次关闭层的操作为什么在调用打开层的方法中调用关闭的方法?最后发现只要注释关闭的方法就可以解决多次点击以后卡死的状态原创 2017-04-28 15:48:38 · 2898 阅读 · 0 评论 -
Java8 lambda使用总结-结合实例介绍
摘要: 1.Java8 新特性介绍 2.项目中应用1.Java8 新特性介绍原文链接 https://my.oschina.net/chenxiaobian/blog/704421写java的同学对java8肯定知道 那么java8到底有哪些特性呢,总结如下:Lambda表达式函数式接口StreamOptionalPredicateFunctionConsume转载 2017-06-03 10:33:07 · 10913 阅读 · 2 评论 -
Lucene7.0与HanLP分词器整合索引数据库建立索引文件
HanLP官网:http://hanlp.linrunsoft.com/GitHup地址:https://github.com/hankcs/HanLPHanLP插件地址:https://github.com/hankcs/hanlp-lucene-plugin需要一下jar包类package com.kyd.demo.hanLP;import ja原创 2017-11-29 14:05:43 · 2412 阅读 · 3 评论 -
windows环境下ElatsicSearch6.0和ElatsicSearch head插件的使用
1.在https://github.com/mobz/elasticsearch-head 下载zip包ElatsicSearch5.0以上版本不支持插件方式启动head插件 , 所以head和search是两个独立的应用启动2.安装node.js 地址: https://nodejs.org/zh-cn/ 设置path环境变量 NODE_HOME=node.js安装根路径3.安装npm工...原创 2017-11-29 17:47:24 · 631 阅读 · 0 评论 -
ElasticSearch6.0配置IK分词器
1.下载IK分词器 地址:https://github.com/medcl/elasticsearch-analysis-ik/releases2.直接解压到ElasticSearch下plugins文件夹即可原创 2017-11-30 08:45:08 · 2112 阅读 · 0 评论 -
文件操作工具类
文件操作工具类,文件复制,文件删除,文件压缩,文件解压/** * 创建新文件 * @param newFilePath * @return 成功返回true,失败返回false */ public static Boolean createNewFile(String newFilePath){ return createNewFile(newFilePath原创 2017-02-28 17:23:55 · 354 阅读 · 0 评论