Java mainstream framework - (11) spring boot advanced

1.SpringBoot auto configuration - Condition-1 Condition is spring 4 The conditional configuration interface introduced after 0 can conditionally load the corresponding beans by implementing the condition interface @Conditional should be used with the implementation class of Condition (ClassCondition) ClassCondition public class ClassCondit ...

Posted by davidtube on Sun, 06 Feb 2022 01:00:50 +0100

SpringBoot: asynchronous, scheduled, mail tasks

Preface (crazy God) In our work, we often use asynchronous processing tasks. For example, when we send mail on the website, the background will send mail. At this time, the foreground will make the response motionless, and the response will not succeed until the mail is sent. Therefore, we generally use multithreading to process these tasks ...

Posted by jamal dakak on Sat, 05 Feb 2022 19:13:36 +0100

Spring Boot automatic assembly (detailed explanation of necessary problems)

Based on Spring Boot 2.6.3, this paper summarizes the core points of interview answers at the end of the article. 1. What is automatic assembly When we use Spring Boot, we will automatically assemble the Bean into the IoC container. For example, when using Redis database, we will introduce the dependency Spring Boot starter data Redis. Af ...

Posted by jjbarnone on Sat, 05 Feb 2022 12:16:01 +0100

Three ways to realize paging in Java project development

preface    the paging function is often used in the development of Java projects. Now SpringBoot is widely used for rapid development, and the data layer mainly integrates two frameworks, SpringDataJPA and MyBatis. Both frameworks provide corresponding paging tools and the use method is very simple. In addition, I also use the third ...

Posted by ktsirig on Sat, 05 Feb 2022 08:12:35 +0100

Introduction and use of Spring Boot

catalogue preface Evolution of Java backend What is Spring boot? text Getting started with Spring boot summary raise a query How to effectively learn methods and technical consultants preface Evolution of Java backend In today's era when the Internet is so developed, the amount of data generated every day is countless. The back- ...

Posted by shiznatix on Sat, 05 Feb 2022 07:01:04 +0100

Spring Security role based authorization example

This guide shows you how to Spring Security Configure role-based authorization in. To use Spring Security authorization, we must override and authorize each requested method according to the logged in user role. configure(HttpSecurity http)WebSecurityConfigurerAdapter What will we build In this example, we will create a Spring Boot appli ...

Posted by Fabis94 on Fri, 04 Feb 2022 13:08:43 +0100

[MyBatis Plus 3.5.1] 2. CRUD extension: automatic filling, optimistic locking, paging query, logical deletion [Spring Boot environment]

1,Insert 1) Insert test @Test void testInsert(){ User user = new User(); user.setName("tuwer"); user.setAge(8); user.setEmail("abc@qq.com"); // id will be generated automatically int res = userMapper.insert(user); System.out.println(res); System.out.println(user); } 2) Primary key policy @TableId ...

Posted by poirot on Fri, 04 Feb 2022 12:45:53 +0100

Redis Notes - Transactions and Integration springboot

affair Redis's single command guarantees atomicity, but the redis transaction does not guarantee atomicity Redis Transaction nature: A collection of commands. ----------------- queue set set set implement ------------------- Each command in a transaction is serialized and executed sequentially. No interference from other commands is allowe ...

Posted by jej1216 on Thu, 03 Feb 2022 20:14:07 +0100

Springboot 2 Foundation - request parameter processing and principle

Springboot 2 Foundation - request parameter processing and principle tags: Spring Boot2021 Shang Silicon ValleyLei Fengyang categories: Static file configurationPrinciple of static file configurationWelcome page and custom FaviconPrinciple of Rest form requestRequest mapping principleUse and principle of various parameters Section I ...

Posted by sanchan on Thu, 03 Feb 2022 19:46:20 +0100

Basic operation of shiro based on springboot

Shiro execution logic Application Code: written applicationSubject: subject, which represents the current "user". This user is not necessarily a specific person. Anything interacting with the current application is a subject, such as web crawler, robot, etc; An abstract concept; All subjects are bound to SecurityManager, and al ...

Posted by marian on Thu, 03 Feb 2022 14:58:35 +0100