String_boot热部署学习

开启

设置Idea Ctrl+Alt+S 查找make project automatically --> 选中
String_boot热部署学习

设置Idea Ctrl+Alt+S 输入: Registry compiler.automake.allow.when.app.running

String_boot热部署学习

pom.xml配置:

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

        <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork>  //该配置必须
                </configuration>
            </plugin>
        </plugins>

说明:
新建一个类与方法修改都能启动

猜你喜欢

转载自blog.51cto.com/357712148/2130113
今日推荐