zoukankan      html  css  js  c++  java
  • springboot项目在idea实现热部署

    在使用Idea 开发SpringBoot项目的过程中,为了避免因为修改文件而产生频繁的手动重启操作,使用 spring 提供的 spring-boot-devtools 开启热部署。步骤如下:

    1、在 pom 文件中引入相关 jar 包。

    <dependency>
    	<groupId>org.springframework.boot</groupId>
    	<artifactId>spring-boot-devtools</artifactId>
    	<scope>runtime</scope>
    	<optional>true</optional>
    </dependency>
    

    2、添加编译插件

    <build>
        <plugins>
          <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
              <fork>true</fork>
              <addResources>true</addResources>
            </configuration>
          </plugin>
        </plugins>
    </build>
    

    3、在 idea 中开启自动编译

    • 点击 File -> setting -> Build,Execution,Deployment -> Compiler,把 Build project automatically 勾上。如下图:

    4、开启热注册

    • 快捷键 ctrl+shift+alt+/,选择 Registry ,然后勾选 compiler.automak.allow.when.app.running 和 actionSystem.assertFocusAccessFromEdt ,如下图:

    5、重启 idea 之后便可以愉快的玩耍啦...

  • 相关阅读:
    ES6的Proxy对象
    ES6的Reflect对象
    v-for中的key
    v-for和v-if的问题
    request请求的get/post的模块的封装
    HTTP 协议和接口分类
    cookies和session区别
    面试题目:接口访问中遇到验证码,怎么解决?
    数据驱动_Excel操作
    python完成http请求 get,post
  • 原文地址:https://www.cnblogs.com/Mhang/p/12525333.html
Copyright © 2011-2022 走看看