Brothers, following yesterday’s code, continue to complete the final user module development, Yesterday I completed the user information editing page. I will improve it today. Let’s start from the backend. Make an interceptor to verify the user’s identity. Interceptor Let me explain it first: Let’s use the interview questions to elaborate: **Interc
Detailed explanation of obtaining request parameters in SpringMVC
Article Directory Obtained through ServletAPI Obtain the request parameters through the formal parameters of the controller method 3、[@RequestParam ](/RequestParam ) 4、[@RequestHeader ](/RequestHeader ) 5、[@CookieValue ](/CookieValue ) Obtain request parameters through POJO Solve the garbled problem of obtaining request para
Remember a springboot upgrade
Let me talk about the background first, because to use a springcloud component, springboot 2.1.17 must be upgraded to springboot 2.6.15 from the corresponding version. first step Replace parent <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.6.15
Rabbit health check failed, org.springframework.amqp.AmqpIOException_ java.io.IOException
1. Problem description The Spring Boot project has added an Amqp dependency, but has not yet used the message queue, and because Acuator monitoring is turned on to expose all endpoints (because amqp is exposed, it is also necessary to check amqp), resulting in this error when the project is started (although it does not […]
SpringBoot quickly builds TCP server and client
Due to work needs, I studied the process of setting up TCP communication with SpringBoot. For those who need it in engineering, I just want to quickly build a usable service. I have read many other tutorials, but I feel they are too complicated and easy to mess up. Here I will only talk about […]
SpringBoot dynamically reads nacos configuration (configuration hot update)
In a microservices architecture, dynamic updating of configurations is critical to application flexibility and maintainability. Spring Cloud provides a mechanism, the @RefreshScope annotation, to implement hot update of configuration. This article will introduce the principle of configuring hot update and the role of @RefreshScope. Configure hot up
Solving the problem of loss of precision when converting SpringBoot global configuration Long to String
first way Simple and crude, change all Long types to String, and change the database to varchar type; Second way Create your own configuration class extends WebMvcConfigurerAdapter has been deprecated, just implement the WebMvcConfigurer interface directly. @EnableWebMvc @Configuration public class WebDataConvertConfig implements WebMvcConfigurer {
Detailed explanation of @FeignClient in Springboot
I. Overview In a microservice architecture, calls between services are very frequent. In order to simplify calls between services, Spring Boot provides a component called Feign. Feign can help us define and implement RESTful interfaces between services. The @FeignClient annotation is a component in Spring Cloud, implemented based on Netflix Feign.
SpringBoot——Internationalization
High-quality blog posts: IT-BLOG-CN 1. Steps for writing internationalization in Spring 【1】Write international configuration files; 【2】Use ResourceBundleMessageSource to manage internationalized resource files; 【3】Use ftp:message on the page to retrieve the internationalized content; 2. SpringBoot writing internationalization steps 【1】Create the i1
springboot_tomcat turns on the access log, monitors and prints each request address and response time
springboot_tomcat turns on the access log, monitors and prints each request address and response time Foreword Environment Configure the corresponding object information AccessLog configuration default value and description Configuration Example Description of pattern parameter composition Commonly used pattern configurations 7.1 pattern defaul