Spring Cloud's Hystrix fuse
The fuse mechanism is a self-protection mechanism. When there are a large number of requests piled up and the service is unable to handle them immediately, the fuse mechanism can decide to discard the requests to ensure that its resources are not exhausted and downtime. The fuse is usually used on the service consumers. When th ...
Posted by jjacquay712 on Thu, 26 Dec 2019 17:38:48 +0100
spring boot uses the assembly plug-in to package dependent jar s into external standalone folders
spring boot packs all dependent jars into one jar by default when it packs and runs jars. This is inconvenient because the packaged jar packages are relatively large and need to be uploaded to the server for a long time. Here, we can use the assembly plug-in to package dependent jars into external independent folders. In the future, we only nee ...
Posted by westmich on Wed, 25 Dec 2019 22:29:45 +0100
Docker initial experience: docker deploys spring cloud project Eureka server
Docker deploys spring cloud project Eureka server
1 create Eureka server project
Create the parent project cloud demo, whose pom.xml is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:// ...
Posted by watson100 on Wed, 18 Dec 2019 15:37:04 +0100
Spring boot extends URLClassLoader to implement nested jar loading
To: https://segmentfault.com/a/11900013532009
In the last article Spring boot application startup principle (1) embedding startup script into jar The principle of how springboot integrates the startup script and Runnable Jar into Executable Jar is introduced in so that the generated jar/war file can be started directly This article will show h ...
Posted by greywire on Fri, 13 Dec 2019 10:57:49 +0100
SpringCloud Distributed Microservice Cloud Architecture Part 3: Service Consumer (Finchley Version)
In the previous article, we talked about how to consume services through RestTemplate+Ribbon. This article mainly talks about how to consume services through Feign.
1. Introduction to FeignFeign is a declarative pseudo-Http client that makes it easier to write Http clients.With Feign, you only need to create an interface and annotate it.It has ...
Posted by bassdog65 on Thu, 12 Dec 2019 19:27:09 +0100
Spring boot integrates Redis - add, update, query, batch delete, etc
Recently, redis cache has been used in our work, so we share something we have summarized. This article uses StringRedisTemplate for learning. The value here is: (1) StringRedisTemplate needs to be serialized when performing batch deletion operation, (2) the update operation is the same as the add operation, and the next code is as follows:1. ...
Posted by kedarnath on Thu, 12 Dec 2019 19:10:37 +0100
MapReduce program 2 of Maven project -- realize the function of counting the total salaries of employees in each department
prerequisite:
1. Install jdk1.8 (under Windows Environment)
2. Install maven 3.3.9 (under Windows Environment)
3. Install eclipse (under Windows Environment)
4. Install hadoop (under Linux environment)
Question:
The input file is: EMP.csv. The contents of the EMP.csv file are as follows: SAL is employee salary (int type), ...
Posted by tsiedsma on Tue, 10 Dec 2019 17:00:49 +0100
Implementation of spring cloud Alibaba rocketmq asynchronous communication
This article discusses how to use RocketMQ Binder to subscribe and publish Spring Cloud application messages.
introduce
RocketMQ It is an open source distributed message system. Based on the highly available distributed cluster technology, it provides low latency and highly reliable message publishing and subscription services, which are widely ...
Posted by Cleibe on Mon, 09 Dec 2019 05:36:31 +0100
Synchronization tool classes CountDownLatch and CyclicBarrier
In the development, some asynchronous operations will obviously speed up the execution speed and bring better experience, but at the same time, it also increases the development complexity. If you want to use many threads, you must understand from these aspects
wait() notify() notifyall() method of thread
Thread returns Future asynchronously
...
Posted by brad_fears on Mon, 09 Dec 2019 01:33:19 +0100
The simplest way to calculate the distance between two longitudes and latitudes in Java
In development, we often encounter the scenario of calculating the distance between two points (longitude and latitude) or calculating the nearest store. Here is a simple implementation of how to calculate the distance between two longitudes and latitudes.
1. Import geodesy's maven dependency or download the jar package from Alibaba cloud's mav ...
Posted by buceta on Sun, 08 Dec 2019 17:16:00 +0100