- 博客(365)
- 资源 (33)
- 收藏
- 关注
原创 Consul7-注销掉consul无效服务
当我们在Spring Cloud应用中使用Consul来实现服务治理时,由于Consul不会自动将不可用的服务实例注销掉(deregister),这使得在实际使用过程中,可能因为一些操作失误、环境变更等原因让Consul中存在一些无效实例信息,而这些实例在Consul中会长期存在,并处于断开状态,这些断开的实例有时候会影响服务的请求,所以我们需要删除这些无效的服务。所以这一篇注意来了...
2019-09-14 10:18:15
7597
2
原创 Consul6-springboot2基于consul的服务调用
Consul1-window安装consulConsul2-使用consul作为服务注册和发现中心Consul3-使用consul作为配置中心Consul4-linux安装consul以及集群搭建Consul5-springboot2使用consul做为配置中心上面的链接是我整理的consul的一系列博文,本篇博文基于Consul5-springboot2使用cons...
2019-09-03 22:08:57
2676
1
原创 Consul5-springboot2使用consul做为配置中心
之前有几篇博客介绍了consul和springboot1.x,对于consul的下载,安装配置不懂的可以看看地址:Consul1-window安装consulConsul2-使用consul作为服务注册和发现中心Consul3-使用consul作为配置中心Consul4-linux安装consul以及集群搭建由于consul已经发行了行的版本,springboot2的...
2019-09-03 21:31:37
4154
原创 springboot2使用jedis连接redis
在springboot1.5.x版本中,springboot默认是使用jedis来操作redis的,但是在springboot2.x版本,默认是使用lettuce来操作数据库,所以配置有些差别。具体的使用参照下面的步骤:1,创建一个springboot2项目 pom配置如下:<?xml version="1.0" encoding="UTF-8"?&g...
2019-07-10 20:48:34
5176
1
原创 38-Count and Say
题目描述:https://leetcode.com/problems/count-and-say/The count-and-say sequence is the sequence of integers with the first five terms as following:1. 12. 113. 214. 12115. 11...
2019-06-30 16:51:53
425
原创 37-Sudoku Solver
题目描述:https://leetcode.com/problems/sudoku-solver/Write a program to solve a Sudoku puzzle by filling the empty cells.Asudoku solution must satisfyall ofthe following rules:Each of the digit...
2019-06-30 16:16:43
490
原创 36-Valid Sudoku
题目描述:Determine if a9x9 Sudoku boardis valid.Only the filled cells need to be validatedaccording to the following rules:Each rowmust contain thedigits1-9without repetition. Each column mus...
2019-06-30 10:13:09
388
原创 35-Search Insert Position
题目描述:https://leetcode.com/problems/search-insert-position/Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were in...
2019-06-30 10:08:24
489
原创 34-Find First and Last Position of Element in Sorted Array
题目描述:https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/Given an array of integersnumssorted in ascending order, find the starting and ending position of a giv...
2019-06-30 10:03:24
386
原创 33-Search in Rotated Sorted Array
题目描述:https://leetcode.com/problems/search-in-rotated-sorted-array/Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e.,[0,1,2,4,5,6,7]might becom...
2019-06-30 09:58:23
311
原创 vue+element-ui+axios+springboot实现文件上传&下载
前端技术:vue,element-ui,axios后台技术:springboot本篇博客只给出关键的代码,提供思路,完全的涉及保密不方便提供一,上传:上传element组件代码,支持多文件,拖动文件进行上传:<!--选择文件--> <el-form-item label="选择模板" :label-width="for...
2019-05-16 19:39:10
10751
1
原创 32-Longest Valid Parentheses
题目描述:https://leetcode.com/problems/longest-valid-parentheses/Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.E...
2019-05-04 20:41:25
364
原创 31-Next Permutation
题目描述:题目地址:https://leetcode.com/problems/next-permutation/Implementnext permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement i...
2019-05-04 14:41:01
325
原创 30-Substring with Concatenation of All Words
题目描述:You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a concatenation of each word inwordsexactly once...
2019-05-04 14:13:59
313
原创 29-Divide Two Integers
题目描述:https://leetcode.com/problems/divide-two-integers/Given two integersdividendanddivisor, divide two integers without using multiplication, division and mod operator.Return the quotient af...
2019-05-04 14:08:44
310
原创 ELK-4-Logstash安装
ELK系列文章地址:ELK一,Windows安装 去官网下载logstash,地址:下载地址 1,下载后解压到相应目录,eg:D:\ELK\logstash-7.0.0 2,在bin目录下建立logstash_default.conf文件,文件内容如下:input { stdin{ }}output { stdout{...
2019-04-27 09:39:56
1259
原创 ELK-3-Kibana安装
一,Windows安装 1,下载Kibana 下载地址:下载Kibana 在下载地址下面,有怎么起的Kibna的步骤,如果还不明白的继续看下面的步骤。2,解压Kibana的包到相应目录 比如我解压到目录:D:\ELK\kibana-7.0.0-windows-x86_643,修改kibana-7.0.0-window...
2019-04-27 09:32:25
528
原创 ELK-2-Elasticsearch安装
windows安装:下载地址:https://www.elastic.co/cn/downloads/elasticsearch安装elasticsearch之前确保已经安装配置好了JDK1,通过上面的下载地址,下载windows版本的Elasticsearch,eg:elasticsearch-7.0.0-windows-x86_64.zip2,把下载的安装包解压到相应目录,如下...
2019-04-17 21:47:28
508
原创 ELK-1-ELK简介
一,ELK简介 ELK是三个开源软件的缩写,分别为:Elasticsearch 、 Logstash以及Kibana , 它们都是开源软件。不过现在还新增了一个Beats,它是一个轻量级的日志收集处理工具(Agent),Beats占用资源少,适合于在各个服务器上搜集日志后传输给Logstash,官方也推荐此工具,目前由于原本的ELK Stack成员中加入了 Beats 工具...
2019-04-17 20:32:52
1284
原创 shiro-学习4-shiro加密
前面我们做用户名和密码比较的时候是用的是明文比较的,这在实际项目中是不允许的,实际的项目中,我们可能需要对密码进行加密,这里我们采用md5加密来给shiro的密码加密,然后比较,md5加密又分为加盐,和不加盐,首先我们来看不加盐,加盐的话可以增加密码的安全性。一,shiro加密不加盐:使用md5加密的话,首先得修改认证,核心代码如下://进行加密 Ha...
2018-12-08 16:43:37
442
原创 shiro-学习3-自定义Realm
前面两篇都是使用的shiro自带的支持的Realm,假如不符合我们业务需求怎么办了?能否自定义了,作为一个优秀的开源框架,当然是可以自定义的了,自定义很简单,只需要继承:AuthorizingRealm 自定义Realm代码如下:package com.jack.realm;import org.apache.shiro.authc.Authentica...
2018-12-08 13:43:30
318
原创 shiro-学习2-shiro权限IniRealm&JDBCRealm
在看着博客之前,如果有什么不懂的可以看前面一篇博客:https://blog.youkuaiyun.com/j903829182/article/details/84889400,下图是shiro的授权过程 一,IniRealm IniRealm是一个把用户信息放置到配置文件中,读取到内存中的Realm 。首先看下配置文件的信息,创建的maven项目有reso...
2018-12-08 09:24:54
441
原创 shiro-学习1-shiro快速入门
shiro是一框简易的认证授权的开源框架,开源使用它快速的完成权限管理。网上的资料很多,具体详细的就不多说了,这里只记录下怎么快速的使用: shiro的架构图如下: 上面的架构图,开源看出用户信息和权限信息都在Realm中,在Authenticator中进行认证,在Authorizer中进行授权。 SessionManager是sessio...
2018-12-08 08:38:38
599
1
原创 爬虫学习5-JSON 数据的分析与解析
JSON 数据格式以及在 Java 网络爬虫中如何解析 JSON 数据?一般java中我们用于操作json的工具有: org.json、Gson 以及 Fastjson,这篇我们来操作网络爬虫中返回数据是json格式的,该怎么处理了。 网络爬虫中经常会遇到 JSON 数据,而在我们请求封装有 JSON 数据的网页时,需要对其进行预处理,使其成为标准化的 JSON 数据。...
2018-11-18 12:05:05
3441
6
原创 爬虫学习4-HTML和XML数据的分析与解析
目前在 Java 中,解析 HTML 工具主要包含以下几种:1,jsoup:强大的 HTML 解析工具,支持以 jQuery 中 CSS Selector 的方式提取 HTML 中的元素,学习成本较低。,2,HtmlCleaner:另外一款开源的 Java 语言的 HTML 文档解析器,支持以 XPath 的方式提取 HTML 中的元素。另外,在此说明,学习 XPath 语法对于使用另外一款基...
2018-11-18 10:39:21
1048
原创 爬虫学习3-网页内容获取工具URLConnection
URLConnection也是java后台用来获取请求数据类,demo代码如下:package com.jack.spiderone.test;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;...
2018-11-18 08:37:01
513
原创 爬虫学习2-网页内容获取工具HttpClient
在java的后台中HttpClient可以用来做http网络请求,需要添加工具包,HttpClient的demo使用案例如下:package com.jack.spiderone.test;import org.apache.http.*;import org.apache.http.client.HttpClient;import org.apache.http.client.co...
2018-11-17 21:56:32
625
原创 爬虫学习1-爬从基础jsoup
java爬从使用jsoup工具包,主要利用了css的选择器选择元素获取信息,demo代码如下:package com.jack.spiderone.test;import org.jsoup.Connection;import org.jsoup.Jsoup;import org.jsoup.nodes.Document;import org.jsoup.nodes.Element...
2018-11-17 16:40:13
424
原创 29-divide-two-integers
题目描述:Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator.Return the quotient after dividing dividend by divisor.The integer divis...
2018-11-06 22:07:25
346
原创 28-implement-strstr
题目描述:Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Example 1:Input: haystack = "hello", needle = "ll"Output: 2...
2018-11-05 22:24:57
972
原创 27-remove-element
题目描述:Your function should return length = 2, with the first two elements of nums being 2.It doesn't matter what you leave beyond the returned length.Example 2:Given nums = [0,1,2,2,3,0,4,2]...
2018-11-05 21:53:07
321
原创 26-remove-duplicates-from-sorted-array
题目描述:Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by ...
2018-11-05 21:30:21
281
原创 25-reverse-nodes-in-k-group
题目描述:Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.k is a positive integer and is less than or equal to the length of the linked list. If the num...
2018-11-04 22:10:43
330
原创 24-swap-nodes-in-pairs
题目描述:Given a linked list, swap every two adjacent nodes and return its head.Example:Given 1->2->3->4, you should return the list as 2->1->4->3.Note:Your algorithm should u...
2018-11-04 20:54:07
294
原创 23-merge-k-sorted-lists
题目描述:Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.Example:Input:[ 1->4->5, 1->3->4, 2->6]Output: 1->1->2->3...
2018-11-04 11:54:16
377
原创 22-generate-parentheses
题目描述:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ "((()))", "(()())", "(())()", "...
2018-11-04 10:58:18
358
原创 21-merge-two-sorted-lists
题目描述:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->4, 1->3->4Out...
2018-11-02 23:31:47
926
原创 20-valid-parentheses
题目描述:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same ty...
2018-11-02 20:59:36
299
原创 19-remove-nth-node-from-end-of-list
题目描述:Given a linked list, remove the n-th node from the end of list and return its head.Example:Given linked list: 1->2->3->4->5, and n = 2.After removing the second node from the...
2018-11-01 22:48:54
913
原创 18-4sum
题目描述:Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum...
2018-11-01 21:41:20
214
原生apphtml2.rar
2017-11-21
转换工具ffmpeg
2017-11-14
zookeeper-3.4.10.tar.gz
2017-06-21
锋利jquery
2015-11-27
commons-fileupload-1.3-bin.zip
2013-04-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人