Annotation ConfigurationProperties inject data into the yml configuration file

In the development of using SpringBoot, some configuration parameters need to be defined in the yml file, and then introduced through Java classes Spring boot provides some annotations to implement this function ConfigurationProperties Value EnableConfigurationProperties The following provides examples to show how to introduce general va ...

Posted by watsmyname on Sat, 23 Nov 2019 11:58:18 -0800

The implementation of delay message in ActiveMQ of SpringBoot

I. installation of activeMQ Please refer to the online tutorial for installation steps, which will not be introduced in this article II. Modify the activeMQ configuration file New configuration information of broker schedulerSupport="true" <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory=" ...

Posted by Jamesm on Tue, 12 Nov 2019 07:09:10 -0800

Spring boot Project Log print project version and build time

function When the spring boot project is started, the basic information of the project will be printed: service name, project version in pom, and the time when the jar package is built. It is convenient to check whether the service is updated to the correct version, and also to provide interface access Implementation steps ...

Posted by ajcrm125 on Sun, 10 Nov 2019 12:13:12 -0800

Using Spring Boot to build RESTful API

1. Use Idea to create Spring Initializer project Add Web and Lombok in the create Project dialog box, or add dependency in pom.xml after the project is created: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> ...

Posted by Shizzell on Sat, 02 Nov 2019 23:56:38 -0700

The use pit of @ Data in Lombok

When you're using Lombok's @Data When commenting, there will be some holes that need attention. Let's see today. Lombok Let's briefly introduce Lombok. Its official introduction is as follows: Project Lombok makes java a spicier language by adding 'handlers' that know how to build and compile simple, boilerplate-free, not-quite-java code ...

Posted by jaytux on Sat, 02 Nov 2019 03:21:15 -0700

A rare Lombok Learning Guide

I. Introduction to Lombok Lombok It is a java development plug-in, which enables Java developers to eliminate tedious and tedious code in business engineering through some annotations defined by it, especially for simple java model objects (POJO s). After using Lombok plug-in in the development environment, Java developers can save a lot of ti ...

Posted by The_Stranger on Wed, 30 Oct 2019 13:07:16 -0700

Summary of spring data JPA

List of reference resources Official document: https://docs.spring.io/spring-data/jpa/docs/2.1.5.RELEASE/reference/html/ Spring Data JPA introduction to mastery Preface JPA is the abbreviation of Java Persistence API. It is the second encapsulation framework of Spring based on Hibernate. In order to better and more convenient integrate int ...

Posted by stenk on Wed, 16 Oct 2019 18:50:11 -0700

Current Limiting Technology for High Concurrent Solution--Counter

1. It is the simplest and easiest current limiting algorithm. The counter realizes current limiting by allowing only 10 requests per minute for the first request to enter at startTime, and only 10 requests within startTime + 60s. When there are more than ten requests in 60s, refuse, do not exceed, and reset time in 60s package com.aiyues ...

Posted by brandye71 on Mon, 14 Oct 2019 10:07:56 -0700

Spring Boot 2 Actual Warfare: Integrating MapStruct Type Conversion Artifact

1. pain spot The emergence of a framework to solve a pain point, I think the following inconvenient operation is often written.Suppose the Car class is a database mapping class:​​ package cn.felord.mapstruct.entity; import lombok.Data; /** * Car * * @author Felordcn * @since 13:35 2019/10/12 **/ @Data public class Car { ...

Posted by rhodrykorb on Sat, 12 Oct 2019 01:30:09 -0700

Hand-held Band You Use Ribbon to Realize Load Balancing on the Client

Previous articles Spring Cloud Building Registry and Service Registration This paper introduces the construction of the registry and the registration of services. This paper will introduce the process of load balancing for service consumers through Ribbon invoking services. Contents of this article I. Ribbon service invocation processII ...

Posted by zkoneffko on Thu, 10 Oct 2019 18:42:02 -0700