Spring Boot Bean definition overriding

In this article, I'll discuss the tricky Spring Boot bean definition override mechanism. In order to make you more clear about the subject, let's start with a quiz. Look at the next simple example. Therefore, we have two configurations that instantiate a bean with the name beanName. In the main application, we only print the value of the bean ( ...

Posted by neller on Sun, 05 Dec 2021 21:54:44 +0100

Implementation of springboot web application security policy

background Recently, the project has been launched, and Party A requires to pass the safety inspection before acceptance. Therefore, a series of safety reinforcement has been carried out for the system according to the scanning results. This paper introduces some common safety problems and protection strategies, and provides corresponding solut ...

Posted by dcf1023 on Sun, 05 Dec 2021 00:50:33 +0100

[SpringBoot+Ajax] cross domain resource sharing CORS front end and back end separation simple demonstration example

Learning links: Cross domain resource sharing CORS detailed explanation - Ruan Yifeng Learning links: Introduction to AJAX - W3School Tools used: IntelliJ IDEA 2021.2.1 Key notes: @ CrossOrigin 1, Introduction   1. Sample introduction     in the previous SpringBoot class, I talked about cross origin resource sha ...

Posted by dreamscape on Fri, 03 Dec 2021 15:01:05 +0100

Quick Start and Use of JWT

Use of JWT(JSON Web Token) Preface This post is correct shiro uses JWT Complete complementary extensions to provide full sample code for detailed use in JWT. If there is a discrepancy between your understanding of RSA and your own reading of this blog, please read the part of this blog explaining RSA. If there are other inconsistencies a ...

Posted by tinker on Wed, 01 Dec 2021 21:06:32 +0100

Detailed explanation of integrating SpringSecurity with SpringBoot based on madness learning [~]

Spring security Official documents: Official documents jurisdiction: Functional authorityAccess rightsMenu permissions We used interceptors and filters to implement these permissions, and used a lot of native code. Now you can use the security framework The core of security framework is to assign permissions to roles, not to corresponding ...

Posted by Bill_Draving on Mon, 29 Nov 2021 14:25:51 +0100

springboot integrates netty and sleuth with MDC to generate traceId

springboot integrates netty, uses slf4j's MDC to generate a traceId for link tracking, and sleuth works together [sleuth and MDC can choose not to use, so there is no need to write aop and annotations, and no need to introduce aop and sleuth]. 1: The jar you need to depend on (choose according to your needs) <!-- version management ...

Posted by twostars on Mon, 29 Nov 2021 00:35:51 +0100

Detailed explanation of RequestBodyAdvice and ResponseBodyAdvice, @ ControllerAdvice annotation

overview RequestBodyAdvice RequestBodyAdvice is an interface provided by spring mvc4.2, which allows the request body to be read and converted into an object, and takes the processing result object as the @ RequestBody parameter or the @ HttpEntity method parameter. It can be seen that its scope of action is: Parameters marked with @ RequestB ...

Posted by hookit on Sat, 27 Nov 2021 05:25:33 +0100

quartz timed task cluster version

Opening note If you have been inspired and thought here, I hope you can praise and support! You have different views on the content. Welcome to write and exchange.Technology stack > > javaMailbox > > 15673219519@163.com describe The previous project has just started. It is easy to realize the stand-alone version through. quartz t ...

Posted by Jakebert on Thu, 25 Nov 2021 03:52:23 +0100

Essential for small projects: SpringBoot Actuator - embedding point and monitoring

In the project, I saw the buried point monitoring, report and log analysis. I'm a little interested and want to make some trouble slowly 1. Data embedding point Monitor the performance of the machine environment and various data such as business processes or logic, and generate corresponding indicators according to these data, then we ca ...

Posted by MikeyNoedel on Wed, 24 Nov 2021 10:10:29 +0100

Redis overview, download, installation, startup and spring boot project integration

environment Linux system version: Ubuntu kylin-20.04-pro Redis version: redis-6.2.5 Redis introduction    Redis is one of the popular NOSQL systems. It is an open source key value storage system written in ANSI c language (different from MySQL in the form of two-dimensional tables). It is similar to Memcache, but it largely ...

Posted by FireyIce01 on Wed, 24 Nov 2021 01:45:48 +0100