Springboot Development (yml configuration and annotation parsing), springbootyml
So easy! The first version is developed. Advanced component integration is required.
The concept of microservices is a timely component as a service, a service as an interface, and an interface as a service. The calling of components uses restful, And the encoding style is actually a restful style. Next, our project development work needs to become increasingly popular, such as yml configuration introducing ports, druid, eruaka, and other components, step by step.
First, let's take a look at the yum configuration features:
Remove click here to add image instructions
Note that the port configuration cannot be declared because the yml file name must be set to application. yml.
Remove click here to add image instructions
In this case, you can change the port to 8079. By the way, the ip address is automatically bound. If the ip address is written to the Intranet, the ip address will be bound directly, and the ip address does not need to be adjusted. If you want to adjust it, you can also study it. If so:
By the way, if you do not want to use yml,
Remove click here to add image instructions
Or,
Remove click here to add image instructions
The results are the same. In fact, yml files will be translated into. properties files later. ,
When using. yml, there must be spaces between the attribute name value and the colon. For example, if name: Isea533 is correct, name: Isea533 is incorrect .; If there is a prefix, it is easier to use the. yml format configuration file.
This is the case:
Remove click here to add image instructions
The attributes that firstName can use are as follows:
Person. firstName, standard camper name
Person. first-name, dotted line (-), recommended in. properties AND. yml configuration files
PERSON_FIRST_NAME, in uppercase underline format. It is recommended to use it in system environment variables.
So now, I understand this Code:
Remove click here to add image instructions
Actually, it is in,
Remove click here to add image instructions
The prefix is referenced here. How can this problem be solved, bro.
Copyright Disclaimer: This article is an original article by the bloggers and cannot be reproduced without the permission of the bloggers.