springbootDay3

1、<!-- 使用用devtools,监听classPath下的文件变动,并且会立即重启应用,因为采用的是虚拟机机制,改项重启是很快的 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>true</scope>
</dependency>

2、SpringBoot性能优化

JVM参数调优

扫包优化(启动优化不是运行优化)

@SpringBootApplication等同于@ComponentScan+@EnableAutoConfiguration

但是使用@SpringBootApplication会扫到很多无用包,增加启动的时间

默认Tomcat容器改为Undertow

Tomcat的吞吐量是5000 UnderTow的吞吐量是8000

Tomcat参数调优

原文地址:https://www.cnblogs.com/wenwenzuiniucha/p/14483278.html