idea使用热部署时修改的两个地方

idea配合热部署功能

springboot使用开发者工具和单元测试

spring-boot-devtools

The spring-boot-devtools module provides additional development-time features such as automatic restarts, for a smoother application development experience. Developer tools are automatically disabled when running a fully packaged application.

需要先添加依赖:

org.springframework.boot:spring-boot-devtools

提供了热部署的功能。IDEA要配合修改一下IDE的配置才能使用热部署的功能。

模块小还好,都一样。模块大的话,特别的浪费开发时间。

自动重启和手动重启的区别:

使用的类加载器不一样。自动重启重新加载的类会少很多,自己手动重启时会重新加载所有的类,所以自动重启的速度会快一点。

image-20200130220642748

image-20200130220349458

posted @ 2020-01-30 22:09  我不是铁杆啊  阅读(245)  评论(0编辑  收藏  举报