Break it! What's new in Spring Boot 2.3.0: how to stop gracefully?

1. What is elegant shutdown Let's start with a simple code, as follows: @RestController public class DemoController {  @GetMapping("/demo")  public String demo() throws InterruptedException {      //Simulate business time-consuming processing flow   Thread.sleep(20 * 1000L);   return "hello";  } } When we request the traffic to execute the busi ...

Posted on Fri, 29 May 2020 04:47:24 -0400 by jaylee

Spring Boot 2.3 gracefully closes the new pose, which is really fragrant!

The latest Spring Boot 2.3 is almost half a month old: https://spring.io/blog/2020/05/15/spring-boot-2-3-0-available-now One of the new features is: Graceful shutdown I've shared such articles before, but now I've even produced the official gesture. For the new function, I have to go to the official for a look. Here's the official description ...

Posted on Thu, 28 May 2020 23:47:37 -0400 by dr4296

What's new: how can Spring Boot 2.3.0 stop gracefully?

Original text: https://mp.weixin.qq.com/s/uvNkdcmwkd6lcSRDhjPUJQ   1. What is elegant shutdown Let's start with a simple piece of code,As follows: @RestControllerpublic class DemoController { @GetMapping("/demo") public String demo() throws InterruptedException {     //Simulate the time-consuming process of business  Thread.sleep(20 * 1000 ...

Posted on Sun, 24 May 2020 06:27:31 -0400 by thebopps

Springboot redirects http to https using Jetty as a container

1 Introduction The Springboot integration with https described earlier uses tomcat as a container and tomcat is an old Java container that has been around for many years.But there are different options for different scenarios, such as Jetty.Jetty is a relatively simple, Handler-based, flexible and extensible Servlet container.Refer to for more ...

Posted on Sun, 03 May 2020 19:21:01 -0400 by jlive

When Gradle downloads the Archiva warehouse, it prompts that it cannot be downloaded due to an error

The error message is as follows: A problem occurred configuring root project 'reoc'. Could not resolve all dependencies for configuration ':classpath'.Could not determine artifacts for org.asciidoctor.convert:org.asciidoctor.convert.gradle.plugin:2.3.0Could not get resource 'https://maven.ossez.com/repository/internal/org/asciidoctor/convert/or ...

Posted on Mon, 13 Apr 2020 13:30:56 -0400 by enormousrodent

Client error: unknown code for readObject at 0x32

Problem description Yes, this is the problem encountered in using the XXL distributed timed task framework. Most of the solutions given on the Internet for this kind of problem are about the wrong project address of the actuator configuration scheduling center. You need to modify the configuration xxl.job.admin.addresses. I don't use the distri ...

Posted on Mon, 30 Mar 2020 01:06:03 -0400 by Ekano

SpringBoot Learning Notes-010

4.8. Configuring an embedded Servlet container SpringBoot defaults to Tomcat as the embedded Servlet container: version 9.0.31 Question? 4.8.1. How to customize and modify the configuration of the Servlet container 1. Modify server-related configurations (see parameters) ServerProperties Class; server.port=8081 server.servlet.context-path= /ep ...

Posted on Mon, 23 Mar 2020 13:06:36 -0400 by php_dev_101

Analysis of 0461-CDH6.0 Expansion Abnormality

Warm Tip: If the picture is not clear when you use the computer to view it, you can use your mobile phone to open the article and click the picture in the text to zoom in to view the original HD image. Fayson's github: https://github.com/fayson/cdhproject Tip: Code block parts can be slid left and righ ...

Posted on Mon, 27 Jan 2020 19:47:53 -0500 by extrovertive

Decoding Base64 data in Java

I have a Base64 encoded image. What is the best way to decode in Java? You want to use only the libraries that come with Sun Java 6. #1 building Another late answer, but my benchmark shows, Jetty's Base64 Encoder Realization Very fast. Inferior to MiGBase64 Fast but comparable iHarder Base64 Hurry up. import org.eclipse.jetty.util.B64C ...

Posted on Wed, 22 Jan 2020 10:20:08 -0500 by atoboldon

Getting started with DropWizard

Dropwizard is a Java high-performance framework that is user-friendly and develops RESTful services. Dropwizard has its own independent style, which can assist to provide powerful JVM based back-end services with Jetty Jackson Jersey and Metrics. Dropwizard brings stability and maturity to the Java ecosystem. Large way to simpl ...

Posted on Fri, 03 Jan 2020 05:20:38 -0500 by mlcheatham