[Java advanced camp] Java concurrency -- CountDownLatch + CyclicBarrier

// There are unreconciled orders while (existUnreconciledOrders()) { // Query unreconciled orders pOrder = getPOrder(); // Query dispatch order dOrder = getDOrder(); // Perform reconciliation Order diff = check(pOrder, dOrder); // Write difference to difference Library save(diff); } Performance bottleneck [ ...

Posted by genesysmedia on Tue, 03 May 2022 06:57:07 +0300

Spring source code: a preliminary understanding of the construction and use of spring projects

Official website address: https://github.com/spring-projects/spring-framework Chinese documents: https://github.com/DocsHome/spring-docs/blob/master/SUMMARY.md Family list: https://spring.io/projects 1, First spring project (Xml mode) 1. Import pom file <dependency> <groupId>org.springframework</groupId> <art ...

Posted by nyfael on Mon, 02 May 2022 23:07:48 +0300

Day133. Exception handling - spring MVC

exception handling 1. Overview of exception handling Spring MVC handles exceptions of the program through HandlerExceptionResolver, including Handler mapping, data binding and exceptions occurring during the execution of the target method. Implementation class of HandlerExceptionResolver provided by spring MVC 2. HandlerExceptionReso ...

Posted by marknt on Mon, 02 May 2022 18:17:07 +0300

2 Get started with Spring quickly

Write Spring programs module: spring-02-hellospring import jar package <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>5 ...

Posted by Iceman512 on Mon, 02 May 2022 18:15:51 +0300

Configure Spring Batch batch failure retry mechanism

1. Introduction By default, Spring batch jobs will fail with any errors during execution. However, sometimes, in order to improve the flexibility of applications, we need to deal with such intermittent faults.In this short article, we will discuss how to configure retry logic in Spring batch processing framework. 2. Simple examples Suppose ther ...

Posted by gva482 on Mon, 02 May 2022 07:40:23 +0300

A simple request forwarding gateway can be used as a middle office gateway. Don't spray if you don't like it

Project address: https://github.com/lcy19930619/api-center Overall design idea: The forwarding gateway needs to be divided into the following five parts 1. Client On the gateway, all requests need to be forwarded to each real service, so the gateway is the client. Considering the forwarding performance of the client, we directly use weblux ...

Posted by j115 on Mon, 02 May 2022 07:27:45 +0300

I didn't expect that Springboot can format the global date like this. It's a little fragrant!

Say in front Recently, several colleagues in the Department have been wronged and left one after another. After three years of working together, they were reluctant to part with each other. After all the formalities were properly handled, they were sent out of the company after greeting. Several elder brothers smiled at me when they left. I imm ...

Posted by oops73 on Mon, 02 May 2022 04:57:44 +0300

Spring boot integrates Spring Security

Introduction to spring security Spring Security is a powerful and highly customizable authentication and access control framework. It is the de facto standard for protecting spring based applications. Spring Security is a framework that focuses on providing authentication and authorization for Java applications. Like all spring projects, the ...

Posted by Rose.S on Sun, 01 May 2022 12:00:28 +0300

Source code analysis series SpringBoot2.0 source code analysis, although the content is a bit much, but you will benefit a lot

Before learning the source code of spring boot 2.0, let's use spring initializr to quickly create a basic and simple example: 1. Start with the main function in the creation example: package com.example; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** * spring boot ...

Posted by paperthinT on Sun, 01 May 2022 11:09:29 +0300

Downtime caused by RestTemplate timeout configuration has been nagging managers for a year

Presumably, many data centers will integrate the data of many systems and then conduct unified planning and processing. The implementation of some business scenarios must rely on the third-party system. In a business scenario, when users are online, they need to request the third-party interface to obtain relevant information in real time, whic ...

Posted by aruns on Sun, 01 May 2022 07:51:35 +0300