2

I'm developing a Spring Boot project with Thymeleaf as template engine. I use Eclipse STS IDE, where I run the project.

If I change something on a template (.html) from inside Eclipse STS I will see the change on the view, but if I use another editor (for example TextMate or Brackets) it doesn't get the change.

Shortly, how can I develop html templates from another editor (external to Eclipse STS)?

Fred K
  • 13,249
  • 14
  • 78
  • 103

2 Answers2

0

Another solution I found is to run the project from a Terminal (outside Eclipse STS):

  1. Open a Terminal and go to the project folder
  2. Launch mvn spring-boot:run
Fred K
  • 13,249
  • 14
  • 78
  • 103
0

For development, disable Thymeleaf template caching by setting the configuration property spring.thymeleaf.cache: false. Note that you'll also need to ensure that the file gets from your src directory into target, where your application is actually serving from. There's an option to tell m2eclipse to keep watching directories even if Eclipse loses focus, but in line with current best practices, I'm using a native frontend pipeline (Mimosa, but Gulp and Grunt are also popular) that writes directly into target/classes on my resources module.

chrylis -cautiouslyoptimistic-
  • 75,269
  • 21
  • 115
  • 152