自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 2021-03-29

ELK 问题整理kibana创建索引模式失败的问题点击创建索引模式无反应1、查看磁盘空间是否够用,当磁盘空间不足时,.kibana是没有权限写入的,这个时候根据自身情况处理看如何减少磁盘使用量。2、在kibana界面的devtools中输入如下命令:GET .kibana/_settings如果 index.blocks.read_only_allow_delete 为true,则设置index.blocks.read_only_allow_delete 为 false 或者为 null执行

2021-03-29 16:02:30 522

原创 Kafka安装与配置

zookeeper安装与配置zookeeper下载官方地址:https://zookeeper.apache.org/releases.html#download1、解压下载zookeeper-3.6.2.jar包tar -zxvf zookeeper-3.6.2.jar2、将conf目录下的zoo_sample.cfg文件复制一份,重命名为zoo.cfg3、修改zoo.cfg配置文件,将dataDir=/tmp/zookeeper修改成zookeeper安装目录所在的data文件夹(需要在安

2021-01-06 16:11:52 173

原创 安装elasticsearch-curator

安装pip[root 180-9 ~]$wget https://bootstrap.pypa.io/get-pip.py--2020-12-26 15:39:41-- https://bootstrap.pypa.io/get-pip.pyResolving bootstrap.pypa.io (bootstrap.pypa.io)... 151.101.228.175, 2a04:4e42:36::175Connecting to bootstrap.pypa.io (bootstrap.py

2020-12-26 16:09:34 697

原创 搭建ELK(Elasticsearch、logstash、kibana)

windows搭建ELK(Elasticsearch、logstash、kibana)参考:https://blog.csdn.net/liutietuo/article/details/104038691https://blog.csdn.net/alex19961223/article/details/104000790

2020-12-25 15:48:42 166

转载 RSA公钥/私钥/签名工具包

package com.example.demo.utils;import org.apache.commons.codec.binary.Base64;import org.springframework.util.Base64Utils;import javax.crypto.Cipher;import java.io.ByteArrayOutputStream;import java.security.*;import java.security.interfaces.RSAPriv

2020-11-28 11:11:58 498

原创 Mac安装、配置Maven

一、maven 官网下载点击 archives 或者 legacy archives下载旧版本的maven二、解压maven当前用户目录下 /Users/userName/.bash_profile文件,如果当前目录没有创建.bash_profile文件使用终端打开文件: vi ~/.bash_profile以下是JDK与Maven环境变量内容设置复制到.bash_profile文件中...

2019-10-16 10:54:17 142

原创 window系统中Maven安装及配置环境变量

第一步:在官网下载Apache Maven第二步:如将下载 apache-maven-3.6.2-bin.zip压缩包解压到电脑的某个盘符:D:\apache-maven-3.6.2第三:右键计算机属性 --> 高级系统设置 --> 高级 --> 环境变量 --> 系统变量 --> 新建变量名:MAVEN_HOME变量值:D:\apache-maven-3.6...

2019-09-06 17:37:59 109

原创 CollectionUtils

package com.test.util;import org.springframework.lang.Nullable;import org.springframework.util.ObjectUtils;import java.util.Arrays;import java.util.Collection;import java.util.List;import java...

2019-08-28 11:53:52 319

原创 Intellij IDEA使用操作及快捷键

快捷键设置都在:File -> Settings -> Keymap设置自动清除无用导入

2019-08-28 10:48:45 153

原创 授权(authorization)的设计思路

本文对授权(authorization)的设计思路,客户端必须得到用户的授权(authorization grant),才能获得令牌(token)授权码模式(authorization code)grantType:表示使用的授权模式,必选项,此处的值固定为"authorization_code"code:表示授权码,加密处理,必选项clientId:表示客户端的ID,必选项system...

2019-08-27 15:05:02 1720

原创 API自定义响应类以及对应状态码

package com.test.beans;import com.test.enums.StatusEnum;import java.io.Serializable;/**@author hy.ding*/public class ResponseBean implements Serializable {private static final long serialVers...

2019-08-27 11:26:18 1426

原创 MockMvcTest

@RunWith(SpringRunner.class):SpringRunner继承类SpringJUnit4ClassRunnerpackage com.test;import com.test.service.CacheService;import org.junit.Assert;import org.junit.Before;import org.junit.Test;im...

2019-08-26 11:40:33 201

原创 Spring Boot @ExceptionHandler和@ControllerAdvice统一处理异常

package com.test.exception;import com.test.beans.ResultBean;import com.test.enums.StatusEnum;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframework.web.bind.annotation...

2019-08-23 17:08:30 450

原创 JSONUtils

package com.test.util;import com.fasterxml.jackson.annotation.JsonInclude;import com.fasterxml.jackson.databind.DeserializationFeature;import com.fasterxml.jackson.databind.JavaType;import com.fa...

2019-08-23 16:43:53 502

原创 Spring Boot 自定义ApplicationContextUtils 以及监视器@WebListener注解不生效处理方法

Spring Boot获取applicationcontext方案一:package com.test.util;import org.springframework.beans.BeansException;import org.springframework.context.ApplicationContext;import org.springframework.context....

2019-08-23 16:35:10 1632

原创 Spring Boot 自定义拦截器(HandlerInterceptor)使用@Autowired注入接口为null解决方法

在自定义拦截器代码中使用@Autowired注入CacheService为null配置信息代码package com.test.config;import com.test.interceptor.MyInterceptor;import org.springframework.context.annotation.Configuration;import org.springfram...

2019-08-23 13:06:18 2516

原创 自定义拦截器HandlerInterceptor

@Componentpublic class MyInterceptor implements HandlerInterceptor { private static Logger logger = LoggerFactory.getLogger(MyInterceptor.class); @Autowired private CacheService cacheSe...

2019-08-23 12:44:20 760

原创 UUIDUtils

UUID 是 通用唯一识别码(Universally Unique Identifier),经由一定的算法机器生成为了保证UUID的唯一性,规范定义了包括网卡MAC地址、时间戳、名字空间(Namespace)、随机或伪随机数、时序等元素,以及从这些元素生成UUID的算法。package com.test.common.util;import java.util.UUID;/** * @...

2019-08-22 16:01:27 403

原创 DateUtils

package com.test.common.util;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import java.text.DateFormat;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Dat...

2019-08-22 14:57:34 93

原创 Linux下安装JDK

一、下载文件从官网下载合适版本如:jdk-8u211-linux-x64.tar.gz二、安装文件1.在 /usr/ 目录下创建 java文件夹mkdir /usr/java2.将压缩包 jdk-8u211-linux-x64.tar.gz 复制到该目录,并解压tar -zxvf jdk-8u211-linux-x64.tar.gz三、修改环境变量1.修改 /etc/profi...

2019-07-16 18:38:16 80

原创 linux 命令

使用rm -rf 目录名字 命令即可-r 就是向下递归,不管有多少级目录,一并删除-f 就是直接强行删除,不作任何提示的意思eg删除文件夹实例:rm -rf /var/log/rs-v4.2.0将会删除/var/log/httpd/access目录以及其下所有文件、文件夹删除文件使用实例:rm -f /var/log/xcurrent.log将会强制删除/var/log/xcurre...

2019-07-16 17:39:41 148

原创 ReflectionUtils

public class ReflectionUtils { private ReflectionUtils() { } private static Logger logger = Logger.getLogger(ReflectionUtils.class); public static void copyProperties(Map<String, String>...

2019-06-20 10:46:12 589

原创 阻止跨网站跟踪(Prevent Cross-Site Tracking)时cookie未获取到,造成服务端获取session失败

ActionContext.getContext().getSession().put(Constants.SYS_INFO, sysInfo);ActionContextUtil.getContext(accountNo).setThemeName();ActionContextUtil.getContext(accountNo).setCustomI18N();配置文件config.p...

2019-06-14 16:06:59 16886 1

转载 Java虚拟机详解02----JVM内存结构

http://www.cnblogs.com/smyhvae/p/4748392.htm

2019-06-05 12:50:37 84

原创 EL表表达式 iterator 属性 status 并不是ognl的根对象,因此访问需要加上#访问

iterator迭代数据时判断语句if使用到属性 status 时,需要加上#访问。<s:property value=”#st.index”/>并且if属性test外层使用单引号,里面使用双引号。 <s:if test='%{arrayList[#st.index].method == "2"}'> <s:text name='OVERSEAS_REMI...

2019-05-17 14:25:16 149

原创 使用eclipse本地调试时,ServletActionContext.getRequest()为空

使用eclipse本地调试时,导入struts2 的jar包。HttpServletRequest request = ServletActionContext.getRequest();request 为空。eclipse配置如下:Project–>Properties–>Targeted Runtimes–>选择使用的服务器即可。...

2019-05-17 10:50:13 1603

转载 Git SSH Key 生成及多个Git SSH Key 生成管理

**单个.ssh文件rsa rsa.pub生成:**一 、设置Git的user name和email:$ git config --global user.name “zanyang”$ git config --global user.email "[email protected]"二、生成SSH密钥过程:1.查看是否已经有了ssh密钥:cd ~/.ssh如果没有密钥则不会有...

2019-04-23 15:20:02 342

转载 js DateFormat

// author: meizz // 对Date的扩展,将 Date 转化为指定格式的String // 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符, // 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) // 例子: // (new Date()).Format("yyyy-MM-dd ...

2019-04-12 10:24:52 5272 1

转载 ASCII码对照表

ASCII(American Standard Code for Information Interchange,美国信息交换标准代码)是基于拉丁字母的一套电脑编码系统,主要用于显示现代英语和其他西欧语言。它是现今最通用的单字节编码系统,并等同于国际标准ISO/IEC 646。http://ascii.911cha.com/...

2019-03-20 11:13:39 170

原创 NumberUtil

package cn.co.xxx.common.utils;import java.math.BigDecimal;import java.util.List;import org.apache.commons.lang3.StringUtils;import org.apache.commons.lang3.math.NumberUtils;public final class...

2019-03-18 18:18:01 576

原创 eclipse不能进入debug模式的解决方法

找到Debug中的项目,右击,选择edit Source Lookup,先remove掉之前的,然后add当前workspace。最后确认下,重新启动服务

2019-03-05 11:13:15 4304

原创 git 常用命令

git 切换到之前版本上git log 查看需要查看的版本的 commit 编码, 取前6位即可git checkout 8d39ad可以使用 git reset HEAD^ 回溯到上一个版本git reset –hard HEAD~100 回溯100个版本...

2019-03-05 11:03:18 213

原创 Eclipse 快捷键

快速修正:Ctrl+1单词补全:Alt+/打开外部Java文档:Shift+F2显示搜索对话框:Ctrl+H快速Outline:Ctrl+O打开资源:Ctrl+Shift+R打开类型:Ctrl+Shift+T显示重构菜单:Alt+Shift+TCtrl+Shift+F4 关闭所有打开的EditerCtrl+Shift+X 把当前选中的文本全部变味大写Ctrl+Shift+Y 把...

2019-03-05 11:01:29 70

原创 PostgreSQL 字段用逗号 “,”隔开 判断是否含有某个值

Array Functions and Operatorshttps://www.postgresql.org/docs/9.2/functions-array.html– Table structure for T_STUDENTDROP TABLE IF EXISTS “public”.“T_STUDENT”;CREATE TABLE “public”.“T_STUDENT” (...

2019-01-28 10:47:18 6148

原创 postgresql中结束掉正在执行的SQL语句

结束进程两种方式:SELECT pg_cancel_backend(PID) 取消后台操作,回滚未提交事物 (select);SELECT pg_terminate_backend(PID) 中断session,回滚未提交事物(select、update、delete、drop);SELECT * FROM pg_stat_activity;根据datid=10841SELECT pg_...

2019-01-02 17:02:07 3007 1

原创 postgresql创建序列查询序列

序列号(SERIAL)类型smallserial(int2),serial(int4)bigserial(int8)DROP TABLE t_student;CREATE TABLE t_student (“Id” serial,“Name” VARCHAR (256));序列函数函数 返回类型 描述currval(regclass) bigint 返回最近一次用 nextv...

2019-01-02 16:38:48 10851

原创 Change type of varchar field to integer: “cannot be cast automatically to type integer”

ALTER TABLE the_table ALTER COLUMN col_name TYPE integer USING (col_name::integer);ALTER TABLE the_table ALTER COLUMN col_name TYPE integer USING (trim(col_name)::integer);

2018-12-17 19:01:51 652

空空如也

空空如也

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

TA关注的人

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