Beijing Taobao project day02

1.SpringBoot program enhancement 1.1 attribute assignment Note: if the configuration information is written into the code in the form of code, the coupling of the program is high and it is inconvenient to expand Requirement: whether the attribute of the object can be assigned dynamically package com.jt.controller; import org.springframework.we ...

Posted by tnewton on Sat, 21 May 2022 18:13:23 +0300

spring boot data verification @ Valid @Validated

Check field // Check field @Valid @Validated yes@Valid One package of is Spring The provided verification mechanism is used.@Valid No grouping function is provided Configure global exception @Slf4j @ControllerAdvice public class GlobalExHandler { @ExceptionHandler(Exception.class) @ResponseBody public String error(Exception e) ...

Posted by cjbeck71081 on Sat, 21 May 2022 07:26:50 +0300

springboot obtains all request parameters through HttpServletRequestWrapper

There are two ways for springboot to obtain parameters through interceptors: one is through request Getparameter gets the parameters passed by Get. The other is through request Getinputstream or requests GetReader obtains the parameters passed through POST/PUT/DELETE/PATCH; 1. What are the methods for interceptors to obtain parameters @PathVa ...

Posted by gerardg on Sat, 21 May 2022 05:54:28 +0300

Improve Spring Boot REST API error handling

introduction Spring Boot provides an excellent exception handling mechanism. The default implementation of ErrorController is good at catching and handling exceptions. In addition, you can also implement @ExceptionHandler yourself to catch and handle specific exceptions. However, there is room for improvement here: Even if a custom @Exceptio ...

Posted by MattWeet on Fri, 20 May 2022 18:31:37 +0300

Getting Started with SpringCloud - Ribbon Use

Spring Cloud Ribbon is a client-side load balancing tool based on HTTP and TCP, which is implemented based on Netflix Ribbon. Through the encapsulation of Spring Cloud, we can easily automatically convert service-oriented REST requests into client-side load balancing service calls. This article mainly introduces the basic use of Ribbon. The sof ...

Posted by MicahCarrick on Fri, 20 May 2022 15:51:02 +0300

[tree structure]: the directory structure for querying the complete path through multiple vertices

Demand background: Recently, in the data R & D platform, there is a search related demand: users can do fuzzy search through the Job name, return the relevant result set, and carry out the complete directory structure. The directory structure of the R & D platform is divided into four types: the root node is the workspace, the sub node ...

Posted by TipPro on Fri, 20 May 2022 07:42:29 +0300

spring boot memo - Nginx, NPM, EasyExcel

Nginx Nginx is an http server (or web server). The server is divided into web server and application server. The web server (http server) is responsible for processing and responding to user requests, such as Apache, IIS and nginx. The application server is the server that stores and runs the system program and is responsible for processing the ...

Posted by wendymelon on Thu, 19 May 2022 17:48:35 +0300

Spring Boot integrates JMS (ActiveMQ)

Spring Boot integrates JMS (ActiveMQ) 1. Introduction to JMS JMS (Java Message Service) is the Java message service. It unifies the standards at the JAVA API level so that multiple clients can interact through JMS. Most message middleware providers provide support for JMS. The relationship between JMS and ActiveMQ is like the relationship be ...

Posted by jasonok6 on Wed, 18 May 2022 22:23:11 +0300

Spring Boot tutorial: Internationalization

[note] this article is translated from: https://www.tutorialspoint.com/spring_boot/spring_boot_internationalization.htm Internationalization is a processing mechanism that allows your application to adapt to different languages and regions without changing the source code. In other words, internationalization is preparation for localization. ...

Posted by glansing on Wed, 18 May 2022 14:52:44 +0300

spring boot sends mail asynchronously

demand I use my own mobile phone to verify my login, and then I want to send the verification code to the bound email when the mobile phone verification code fails to be sent. (it mainly costs money to send the mobile phone verification code, so I don't want to package the package for my study and test project. Then I want to be familiar with t ...

Posted by cdjsjoe on Wed, 18 May 2022 10:47:49 +0300