Springboot Development (yml configuration and annotation parsing), springbootyml

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.