catalogue
preface
Definition of YML
Syntax introduction of YML (YAML)
Basic grammar
Translation character
About the name of the key
About placeholders
springboot uses the yml variable
@Value usage
@ConfigurationProperties use
preface
Usually, our springboot project often uses YML configuration files. After using them for a period ...
Posted by phpuser_2000 on Sat, 21 May 2022 23:52:33 +0300
Welcome to my GitHub
https://github.com/zq2599/blog_demos
Content: A summary of all original articles, including Java, Docker, Kubernetes, DevOPS, etc.
This is the second article in the MyBatis Beginner Actual Warfare series. We know how to integrate MyBatis in SpringBoot from the previous article. We will practice basic skills together: adding ...
Posted by Ekate on Sat, 21 May 2022 20:05:01 +0300
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
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
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
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
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
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
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)
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