I. Setting up lazy loading in yml
spring: main: lazy-initialization: true
Second, SpringBoot startup class to add the annotation @Indexed (Spring5 to have the annotation)
@Indexed @EnableAsync @RestController @SpringBootApplication(exclude = {}) @EnableTransactionManagement @MapperScan(basePackages = {".*.", ""}) public class AdminRun {
Both of the above optimizations for SpringBoot startup speed are not very high, and can only be improved by about 20 percent
Third, upgrade jdk to 17
IV. Using SpringBoot3
to this article on SpringBoot optimize the startup speed of the method to achieve the article is introduced to this, more SpringBoot optimize the startup speed of content, please search for my previous articles or continue to browse the following related articles I hope that you will support me more in the future!