Springboot interview questions

Prodigal son Tang Shao 2022-02-13 07:29:22 阅读数:872

springboot interview questions

Spring Boot Interview questions

1. What is? spring boot?

springboot It can be said to solve Spring Born of shortcomings , Mainly to simplify spring Configuration and development process .

2.Spring Boot advantage

(1) Automatic configuration :

Simplified configuration , Be able to build projects quickly .springboot Automatic configuration in is SpringBoot Some configurations are automatically made for us at the bottom , therefore springboot The project can run normally without writing a configuration file , But we need to modify it according to our specific development needs SpringBoot Default for auto configuration ;

(2) Start relying on :

To simplify the maven To configure , Avoid a lot of Maven Import conflicts with various versions ;

(3) Embedded Server

It's embedded Tomcat The server , You don't have to pack it into war package , Can run independently

3.SpringBoot Medium application.properties perhaps application.yml What is the profile ?

application.yml and application.properties( Default profile ) File both files are SpringBoot Configuration file for , Comments can be used # No , Just because application.yml It looks more intuitive , Clearer . But be careful :properties The priority of the file is higher than yml file , That is, if port numbers are configured in both files , Only properties The port number in is valid , and yml Invalid port configuration in file .

【1】application.properties file , stay properties In the file ”.” Divided ;

【2】application.properties file , All are K-V Format , And through ” : ” Assign values using quotation marks ; Note that there is a space after the colon ;

copyright:author[Prodigal son Tang Shao],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130729197942.html