Introduction and practice of global unified exception handling

PS: This article is detailed, so it is long. Reading time: 30m~1h. Please read it carefully. I hope you can have a clear understanding of unified exception handling in an hour. 1. Background In the process of software development, it is inevitable to deal with all kinds of exceptions. For myself, at least more than half of the time is dealing ...

Posted by cheechm on Thu, 04 Nov 2021 23:24:19 -0700

After using the cache object ConcurrentLruCache, the key value cannot be hit, resulting in the failure to improve the system performance

1. Problem Description: Concurrent lrucache is used as the JVM cache pool object public class UserManager { private ConcurrentLruCache<UserCacheKey, UserInfo> cache = new ConcurrentLruCache<UserCacheKey, UserInfo>(100, new Function<UserCacheKey, UserInfo>() { @Override public UserInfo apply(UserCacheK ...

Posted by lisa3711 on Thu, 04 Nov 2021 22:15:27 -0700

OpenFeign full explanation

2. What is Feign? Feign is also a hard role, and it is designed to make Java Http clients easier. Feign integrates Ribbon and RestTemplate to make load balancing Http calls, but encapsulates the original way (Ribbon+RestTemplate). Instead of manually using RestTemplate to invoke services, developers define an interface in which service call ...

Posted by DGaleDavid on Thu, 04 Nov 2021 13:35:43 -0700

Analysis of SpringBoot Auto-assembly Principle

In springBoot, we don't need to do any configuration to write directly at the business level Code, because springBoot Help US configure all the environments. Here's a simple springboot Project Analysis Project Code springBoot main program ```java @SpringBootApplication public class HelloApplication { public static void main(String[] arg ...

Posted by sgs-techie on Thu, 04 Nov 2021 12:08:59 -0700

Arthas online java process diagnosis tool online debugging artifact

tag: java diagnostic stack online debugging time-consuming deadlock arthas Alibaba Arthas Arthas is an open source Java diagnostic tool of Alibaba, which is deeply loved by developers. Official website documents: https://arthas.aliyun.com/doc/ When you encounter the following similar problems and are helpless, Arthas can help you solve them: ...

Posted by betportal on Thu, 04 Nov 2021 08:51:39 -0700

Introduction to Spring -- 06

Spring AOP 1. What is AOP? In the software industry, AOP is the abbreviation of Aspect Oriented Programming, which means: Aspect Oriented Programming, a technology to realize the unified maintenance of program functions through precompiled mode and dynamic agent during operation. AOP is the continuation of OOP, a hot spot in software developm ...

Posted by cookiemonster4470 on Thu, 04 Nov 2021 08:36:33 -0700

Spring Security Series tutorial 28 -- implementing CAS single sign on with spring security Part 2 -- building CAS client

preface In the previous chapter, I took you to build the CAS Server side project, that is, we built a unified single sign on authentication center. Next, we can build the CAS client project, and then realize the interactive authentication between the client and the server, so as to complete single sign on. Next, you will follow brother Yige t ...

Posted by richcrack on Wed, 03 Nov 2021 21:31:12 -0700

Principles of Spring (15) -- implementation of Spring AOP source code

@TOC #Spring collection Record every step of the program___ auth:huf Yesterday, careful students have found a problem; In Spring 5.X or SpringBoot 2.x, the CGLIB interface is used regardless of whether the class implements the interface In Spring 5.X, Spring uses the CGLIB interface by default. In Spring 4, the JDK proxy is used, but after 5. ...

Posted by mlavwilson on Wed, 03 Nov 2021 19:51:54 -0700

Shangyangge springcloud config

SpringCloud Config configuration center summary What is it? SpringCloud Config provides centralized external configuration support for microservices in the microservice architecture. The configuration server provides a centralized external configuration for all environments of different microservice applications. How do you play? Spring c ...

Posted by clapton on Tue, 02 Nov 2021 10:07:28 -0700

Java interview sorting

1, Jingdong interview questions 1. Implementation principle of @ Autowired 1. Injection method:         1. Constructor based dependency injection public class UserServiceImpl implents UserService{ private UserDao userDao; @Autowire public UserServiceImpl(UserDao userDao){ this.userDao = ...

Posted by donkru on Tue, 02 Nov 2021 04:50:34 -0700