0
点赞
收藏
分享

微信扫一扫

SpringBoot 实现 elasticsearch 查询操作(RestHighLevelClient 的案例实战)

第一步引入spring-boot-devtools依赖

        <!--热部署-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <!--默认false改依赖是否可以传递,true只在当前项目可以使用,依赖了此项目的项目无法使用-->
            <optional>true</optional>
        </dependency>

第二步开启自动编译
file->setting

ctrl+alt+shift+\开启,找到compiler.automake.allow.when.app.running,打勾ctrl+alt+shift+\开启
查看是否生效
显示[ restartedMain]就是生效了在这里插入图片描述
尽情享受热部署给你带来的开发乐趣吧,再也不用频繁重启了

举报

相关推荐

0 条评论