The core of spring boot is automatic configuration, and the starter projects support automatic configuration. In addition to the official starter, users can also customize their own starter projects according to the rules.
Custom starter conditions
The automation configuration shall meet the following conditions:
Check the corresponding classe ...
Posted on Wed, 06 Nov 2019 20:56:01 -0500 by mrgrammar
In this article, we will explore how to access HTTP header information in Spring Rest Controller.
First, we will use the @ RequestHeader annotation to read the HTTP header information separately or simultaneously.
After that, we will delve into the properties of @ RequestHeader.
Get HTTP header information
Get single HTTP header infor ...
Posted on Wed, 06 Nov 2019 20:04:58 -0500 by tgh
In the last article, we built a SkyWalking based distributed tracking environment. Today, we talk about using SkyWalking to monitor our microservices (DUBBO)
Suppose you have an order microservice that contains the following components
MySQL database sub table sub database (2 sets)
Producer (2 sets) Dubbo provider
Consumer Dubbo c ...
Posted on Wed, 06 Nov 2019 20:02:56 -0500 by TANK
In the stage of more and more advocating out of the box use, many details are hidden behind us, especially after we start to use spring boot, more automatic configuration makes us convenient, but also makes us think more deeply.
In this article, we will learn more about the problems related to the response body process.
II. Core ...
Posted on Wed, 06 Nov 2019 19:56:42 -0500 by VapiD
When doing business, in order to isolate changes, we will separate DO queried by DAO from DTO provided by front end. About 90% of the time, their structures are similar; however, we don't like to write a lot of lengthy code like b.setF1(a.getF1()), so we need to simplify the object copying method.
Most of the time, Apache or Spring`BeanUtils ar ...
Posted on Wed, 06 Nov 2019 19:08:26 -0500 by tomsasse
alibaba.fastjson has provided a tool class GenericFastJsonRedisSerializer for serializing Redis storage objects, but the tool returns to Object when deserializing. We define an extended tool class based on GenericFastJsonRedisSerializer, and automatically convert it to the specified java Object after deserializing.
Posted on Wed, 06 Nov 2019 16:58:51 -0500 by MsShelle
We will analyze the whole project of common service, record the whole construction process, and let more people to learn.
First, before building the common service of spring cloud, we need to prepare the following technologies:
Maven (project construction), Spring Boot, Spring Cloud, microservice concept, decentralization idea, distribution, et ...
Posted on Wed, 06 Nov 2019 09:59:46 -0500 by dirty_n4ppy
The main function of JDBC template in Spring is to realize data interaction. Next, we will use JDBC template to write test cases in dao layer
The project contents are as follows
Implementation of JDBC template based on xml
Here we use the class of JdbcDaoSupport, mainly to reduce the repetition of the Jdbctemplate set method used ...
Posted on Wed, 06 Nov 2019 10:00:06 -0500 by Dimitri89
Generally, in Spring applications, when we use @ Bean, @ Service, @ Controller, @ Configuration or other specific annotations to inject Bean into Spring IoC. Then we can use @ Autowired or JSR250, JSR330 specification annotations provided by Spring framework to use beans managed by Spring IoC.
2. Get the Bean from the application co ...
Posted on Tue, 05 Nov 2019 16:29:45 -0500 by cahva
Spring boot integrates Ehcache
Spring boot integrates spring dataredis
I. spring boot integrates Ehcache
1. Import related maven dependencies
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http:// ...
Posted on Tue, 05 Nov 2019 14:18:37 -0500 by gtibok