What is it?Spring Boot is a sub-project of the Spring open source organization and a one-stop solution for Spring components. It simplifies the difficulty of using Spring, saves the heavy configuration, and provides various starters so that developers can get started quickly. Why use it?Five advantages: 1. Starting Dependencies The official has integrated a large number of starting dependencies for us, which simplifies our work of building projects. At the same time, starting dependencies provide reliable dependency management, reducing the risk of introducing problematic versions and dependency conflicts into the project. 2. Automatic configuration turns on component scanning and automatic configuration. Disable specific auto-configuration via the exclude parameter. 3. Application monitoring The core of Spring Boot monitoring is the spring-boot-starter-actuator dependency. After adding the dependency, Spring Boot will configure some common monitoring by default, such as jvm monitoring, class loading, health monitoring, etc. The Actuator plug-in is a service provided by SpringBoot natively. It can be used to output a lot of endpoint information in the application by exposing endpoint routing. 4. Independent operation SpringBoot has a built-in Tomcat container, and you can directly execute the main method to run. The project deployment can be packaged into a jar file and run the service on the server by executing the java -jar command. 5. During the development of a hot deployment project, page data or data structure is often changed. In order to display the effect of the change, it is often necessary to restart the application to view the change effect. In fact, it is to recompile and generate a new Class file. This file records various information corresponding to the code, and then the Class file will be loaded by the virtual machine's ClassLoader. Hot deployment takes advantage of this feature. If it detects that a Class file has been changed, it will create a new ClassLoader to load the file. After a series of processes, the result will be presented to us. Case1. Develop springboot microservices 2. Package the springboot application There are generally two formats of packages, the case uses jar 3. Package the project aliyun-sdk-oss-2.6.1.jar 4. Create a Dockerfile directory in the server mkdir /root/springboot Upload the jar package to this directory and load the Java environment image openjdk /root/springboot Create a Dockerfile FROM openjdk:8-jre 5. Build the image 6. Run the container This is the end of this article about analyzing the practical records of using docker and SpringBoot to build microservices. For more relevant content about building microservices with docker and SpringBoot, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: HTML adaptive table method
>>: 9 Tips for MySQL Database Optimization
In the case of concurrent access, non-repeatable ...
Table of contents 1. Use JavaScript to parse the ...
1. Download the MySQL installation package (there...
The steps for configuring Tomcat in IDEA 2020 are...
I have written an example before, a simple UDP se...
This article uses examples to illustrate how to i...
Install 8.0.13 based on MySQL 6.1.3. MySQL 8.0.13...
Click here to return to the 123WORDPRESS.COM HTML ...
Original address: http://www.webdesignfromscratch...
Result:Implementation Code html <div class=...
Generally, the colspan attribute of the <td>...
There are many tags in XHTML, but only a few are ...
Syntax format: row_number() over(partition by gro...
Directly to the configuration file server { liste...
MySQL supports nested transactions, but not many ...