9 Best Practices for Java to handle exceptions!

Handling exceptions in Java is not an easy task. It is not only difficult for beginners to understand, even some experienced developers also need to spend a lot of time thinking about how to handle exceptions, including which exceptions need to be handled, how to handle and so on. This is also the reason why most development teams will make som ...

Posted by vonnero on Thu, 14 May 2020 01:31:20 -0700

How to integrate Shiro+JWT with Spring Boot? Here's the easiest way to teach you

brief introduction At present, most RESTful systems use JWT for authorization verification. In Spring Boot, Shiro and JWT can be used for simple permission and authentication verification. In the process of integration with Spring Boot, there are many holes. Combined with their own and common application scenarios, we developed the simplest in ...

Posted by TronB24 on Wed, 13 May 2020 06:54:44 -0700

File download - Download Excel

1. Prepare the data first. The data here is not the data directly found in the database, but a copy of the data found. The data of the two does not affect each other, so that the copied data can be modified. (1) define a method (implementation class method of service layer) of data found from database, omit the method of mapper mapping file and ...

Posted by Duey on Tue, 12 May 2020 07:10:01 -0700

Spring boot Learning Series -- declarative transaction

1, Spring's transaction mechanism All data access technologies have transaction processing mechanisms, which provide API s to enable transactions, commit transactions to complete data operations, or roll back data in case of errors. Spring's transaction mechanism is to use a unified mechanism to handle transactions of different data a ...

Posted by fredi_bieging on Mon, 11 May 2020 00:00:46 -0700

Create the correct pose for thread pool, please give it a meaningful name

Why do we need to specify meaningful thread names when creating threads or thread pools? The ultimate goal is to facilitate backtracking. In our daily development, a project will create many thread pools for resource isolation, but if we do not have a good name, it will be difficult to locate when there is a problem. public class Demo5 { ​ ...

Posted by arn_php on Sun, 10 May 2020 22:11:34 -0700

Do you know how Spring resolves configuration classes?

Do you know how Spring resolves configuration classes? Catalog Second line of code in SpringClassPathBeanDefinitionScanner Source Analysis1. Complete the scan by findCandidateComponents method2. Execute the postProcessBeanDefinition method3. Execute the processCommonDefinitionAnnotations method4. Register BeanDefinitionHow does Spring resolve ...

Posted by bigger on Sun, 10 May 2020 18:13:22 -0700

Qt Open Source Works 6-Universal Video Control

1. Preface In the previous video monitoring system, according to the needs of different users, many kinds of video monitoring cores have been made, including ffmpeg cores, vlc cores, mpv cores, and Haikang sdk cores. In order to make a common function, different cores are very convenient to switch, such as pro changing the variable name of DEFI ...

Posted by jimdavidson on Sun, 10 May 2020 18:09:31 -0700

Wechat applets log in to their own applications

My hobby is to make plans, overturn plans, make plans again, and let others supervise my study, supervise my weight loss, and supervise me to change my bad habits. So I'm going to make a little program for myself. The layout of the applet interface is almost finished. Now let's register and log in your application. 1, Applet side: 1,.wxml <v ...

Posted by Obsession on Sun, 10 May 2020 07:07:06 -0700

How to improve the reliability of RabbitMQ message consumption in human resource management system

Learn how to improve the reliability of RabbitMQ message consumption in human resource management system, and avoid repeated consumption of messages. 1 General stay How to improve the reliability of RabbitMQ message sending in human resource management system In this paper, we ensure the reliability of message sending. However, under such a mec ...

Posted by ijug.net on Sat, 09 May 2020 02:58:55 -0700

15. Chapter 15 of spring cloud Alibaba, upgrade, distributed transaction solution, Seata

Chapter 14 of SpringCloud Alibaba, upgrade, distributed transaction solution, Seata 1, Overview of distributed transactions 1. What is distributed transaction With the rapid development of the Internet, the software system has changed from the original single application to the distributed application. The distributed system will split an appli ...

Posted by fatmcgav on Sat, 09 May 2020 02:57:10 -0700