Spring CloudFeign transfers date type parameters with a time difference of 14 hours

I. Time difference of Java Date type Look at the code below. public static void main(String[] args) throws Exception { Date date1 = new Date(); System.out.println("date1: " + date1.toString()); Date date2 = new Date(date1.toString()); System.out.println("date2: " + date2.toString()); } The results are as follows. date1: ...

Posted by timvw on Mon, 22 Jul 2019 05:50:49 +0200

Several load balancing methods in Dubbo

AbstractLoadBalance In Dubbo, all load balancing implementation classes inherit from AbstractLoadBalance, which implements the LoadBalance interface and encapsulates some common logic. as follows public <T> Invoker<T> select(List<Invoker<T>> invokers, URL url, Invocation invoc ...

Posted by Fly on Sun, 21 Jul 2019 12:30:39 +0200

Android performance optimization - memory leak

Reload address: http://www.jianshu.com/p/402225fce4b2 JVM Memory Management Java uses GC for memory management.An in-depth knowledge of JVM memory management is recommended, Understanding Java Virtual Machines in depth.As for memory leaks, there are several strategies for memory allocation in JVM. Static Static memory, which is allocate ...

Posted by MobiTec on Tue, 09 Jul 2019 19:15:07 +0200

Thread Local Cache TLAB for JVM Source Analysis

Short Book Occupy the wolfPlease note the origin of the original, thank you! background Before introducing TLAB, consider a question:When creating objects, you need to request memory of a specified size on the heap. If there are a large number of threads requesting memory at the same time, you can ensure that the same block of memory will not b ...

Posted by exoskeleton on Wed, 03 Jul 2019 18:35:43 +0200

C++ Simulate gc Garbage Collection

Description: Code implementation Learn from this article There are many ways to find and recycle unwanted objects. The easiest and earliest is called "mark-and-clear". Process: Starting with the root object, traverse the entire object graph.Each time an object is accessed, a token bit is set to true. Once the traversal is complete, f ...

Posted by undecided name 01 on Tue, 02 Jul 2019 18:58:45 +0200

Java Thread Source Parsing

Thread Source Parsing Thread method is mostly used by Native, which does not allow application layer modification. It is the most basic unit of CPU scheduling. Thread resource overhead is relatively small relative to process overhead, so we generally create thread execution, not process execution. Thread Construction Method /** * Initi ...

Posted by craigbabe on Mon, 01 Jul 2019 01:52:13 +0200

Singleton pattern of java design pattern

I believe many children's shoes that make java have heard of it. But let them write it out at once. Even those who have 2-3 years'working experience may not be able to write a usable singleton pattern. So let's learn the singleton pattern today. There are usually two modes Immediate Loading-Hunger Mode: Immediate Loading is when the object i ...

Posted by double on Sat, 29 Jun 2019 20:49:44 +0200

A zip file operation resulted in a JVM crash

1. Overview Program Operating System: CentOS6.5 64bit JDK Version: 7 2. Testing 2.1 Prepare test program The test program is simple, just like a class, a main function, the general flow: The interval for getting the zip file from the parameter is read first, then the zip file path is obtained from the parameter.Then get the full path ...

Posted by SheetWise on Fri, 21 Jun 2019 18:39:57 +0200

Java exception mechanism -- try catch final execution sequence

Introduction There are many written interview questions about try catch final execution order. I have encountered them more than once while brushing the questions on Niuke. And I have missed them more than once. The details involved in them will produce a specious feeling if I don't know clearly each time I do the questions. This time, I have ...

Posted by echelon2010 on Fri, 21 Jun 2019 02:32:33 +0200

IO [Byte Stream, High Efficiency Stream]

IO flow: I:input, input, read to memory O:Output, output, write to file Stream: Data Stream (Characters, Bytes)Classification:Flow to: Input: FileInput Stream, FileReader Output: FileOutput Stream, FileWriterCategory: Characters, bytes java.io.OutputStream: Byte output stream, which is the parent class of all byte output streams ...

Posted by SQHell on Fri, 21 Jun 2019 01:48:09 +0200