springboot开启热部署Devtools

  1. Adding devtools to your project

<dependency>
    <groupId>org.springframework.bootgroupId>
    <artifactId>spring-boot-devtoolsartifactId>
    <scope>runtimescope>
    <optional>trueoptional>
dependency>
  1. Adding plugin to your pom.xml
<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-maven-pluginartifactId>
            <configuration>
                <fork>truefork>
                <addResources>trueaddResources>
            configuration>
        plugin>
    plugins>
build>
 

  1. Enabling automatic build
    springboot开启热部署Devtools_第1张图片

  2. Update the value of
    springboot开启热部署Devtools_第2张图片
    springboot开启热部署Devtools_第3张图片

  3. idea重启(2019版本不需要重启即可生效)

你可能感兴趣的:(springboot,spring,boot,java,intellij-idea)