我使用 IntelliJ 创建了一个简单的 Spring Boot 应用程序,该应用程序使用 Spring Boot Devtools 作为依赖项,使用 Gradle 作为构建自动化选项:Use default gradle wrapper. 但是,Devtools 似乎不起作用。当我更改我的 html 文件时,即使我多次刷新页面也不会更新。我使用Spring Boot Devtools 文档作为参考。
我的application.properties是空的
这是我的build.gradle:
buildscript {
ext {
springBootVersion = '2.0.5.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
} …Run Code Online (Sandbox Code Playgroud)