I am using this dependency in a spring boot application:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
The documentation says:
By default, changing resources in /META-INF/maven, /META-INF/resources, /resources, /static, /public, or /templates does not trigger a restart but does trigger a live reload.
The live reload documentation says:
The spring-boot-devtools module includes an embedded LiveReload server that can be used to trigger a browser refresh when a resource is changed. LiveReload browser extensions are freely available for Chrome, Firefox and Safari from livereload.com.
Now, I am using Maven and my static folder is under src/main/resources, so my folder structure is:
src/main/resources/static/index.html
This is what's in my index.html file:
<!DOCTYPE HTML>
<html>
<head>
<title>Getting Started: Serving Web Content</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<p>HI THERE! Get your greeting <a href="/greeting">here</a></p>
</body>
</html>
I using chrome browser but am not using any live reload browser extension in chrome.
I run the application with this Powershell command (since I'm using spring boot maven plugin):
mvn clean package; java -jar target\project-name-version.jar
This starts up the server on localhost:8080 and displays the contents of index.html in a web page.
However, when I then make changes to index.html in Eclipse IDE and save the file, and I then refresh the browser page, I do not see the new changes.
How come live reload isn't working for me? What am I doing wrong?