SpringBoot-24 - detailed explanation of the default Jason framework jackson

SpringBoot-24 - detailed explanation of jackson configuration of default Json framework How spring boot returns JSON data At present, there are three JSon formats provided by SpringBoot: Default jackson Gson JsonB fastjson (this is provided by Alibaba and is now widely used in China) We can see all these in the spring boot autoconfigur ...

Posted by Immortal55 on Thu, 10 Mar 2022 04:49:37 +0100

Don't make these 10 Mistakes of Spring!

1. Error 1: paying too much attention to the bottom We are addressing this common mistake because the "not created by me" syndrome is common in the field of software development. Symptoms include frequent rewriting of common code, which many developers have. Although it is good and necessary to understand the internal structure and im ...

Posted by smarty_pockets on Thu, 10 Mar 2022 02:43:05 +0100

spring lifecycle callback (do something after loading and before logging off)

The spring lifecycle callback is on the official website https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#beans -The factory life cycle is explained in detail. Spring's lifecycle callback is divided into Bean's lifecycle callback and container's lifecycle callback. 1. Lifecycle callback of bean 1.1 Bea ...

Posted by julius_h on Wed, 09 Mar 2022 14:23:25 +0100

SpringBoot04: JSR303 data verification and multi environment switching

JSR303 data verification Let's see how to use it first In Springboot, @ validated can be used to verify the data. If the data is abnormal, exceptions will be thrown uniformly to facilitate the unified processing of the exception center. Let's write a comment here so that our name can only support Email format; @Component //Register bean @Con ...

Posted by iacataca on Wed, 09 Mar 2022 12:20:15 +0100

Elasticsearch client and API usage in SpringBoot

Official documents: Java Transport Client (deprecated) [7.17] | Elastic 1. Create client (1)TransportClient The TransportClient client will be deprecated in ES version 7.0 and completely removed in version 8.0 Create steps: //Directly in http://127.0.0.1:9200/ You can see the cluster corresponding to es in_ name Settings settings= Settings ...

Posted by nashirak on Wed, 09 Mar 2022 10:51:25 +0100

Detailed steps for integrating Mybatis using SpringBoot

Step 1: configure pom file, and configure mybatis and database related dependencies Here, mybatis uses version 3.4.5. Note: mybatis 3 @ Mapper annotation is only supported for versions above 4.0 Relevant dependency codes are as follows: <dependency> <groupId>org.mybatis</groupId> <artifactId> ...

Posted by jschultz on Wed, 09 Mar 2022 09:20:09 +0100

The finishBeanFactoryInitialization method in the eighth part of Spring source code analysis is to initialize the singleton bean

The finishBeanFactoryInitialization method in the eighth part of Spring source code analysis is to initialize the singleton beanA profound interpretation of the seven thousand word long article, how to initialize the singleton bean in Spirng, and how does Spring solve the circular dependency most often asked in the interview?Today, the most imp ...

Posted by khendar on Wed, 09 Mar 2022 04:25:29 +0100

Spring cloud Nacos and feign report errors: Java lang.IllegalStateException: No Feign Client for loadBalancing defined

Problem description Recently, during the process of using the latest version of nacos and feign, an error was encountered during startup: Caused by: java.lang.IllegalStateException: No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalancer? Puzzled, the previous version of spring cloud did ...

Posted by lisawebs on Tue, 08 Mar 2022 20:32:23 +0100

@Usage and examples of Async

@Usage and examples of Async annotations background In general, the method calls in Java are synchronous calls. For example, the B method is invoked in the A method. After the B method is invoked by A, the B method must wait for execution and return, and the A method can continue to execute. A problem that is easy to occur is that if m ...

Posted by kenyabob on Tue, 08 Mar 2022 13:00:29 +0100

Talk about how to customize the eureka management interface

preface Before the launch of nacos, eureka was basically the first choice for the registration center of the whole family bucket system of spring cloud. With the emergence of nacos, more and more micro service projects based on spring cloud use nacos as the registration center, but does this mean that eureka has no place to use force? In fact, ...

Posted by franzy_pan on Tue, 08 Mar 2022 06:57:59 +0100