2

OS: Windows 10

Intellij: 2016.3.2

Java: 1.7

I have a basic Springboot project using Thymeleaf as the templating engine. When I make a change to a Java file I can use menu option Build > Recompile (Ctrl + Shift + F9) to recompile.

This option is not available for *.html files. (Note: this used to work).

I am using an embedded tomcat as part of Spring.

Any idea as to why this option is now grayed out?

Assuming it must be a setting thing but I simply couldn't find anything on the web but I did read something about "Update classes and resources" options are only available when the deployment option is an "exploded" war.

Ithar
  • 4,865
  • 4
  • 39
  • 40
  • Just found out this. In version 2016.2 *recompile* for Thymeleaf templates was available. Alternative option will be *Build → Rebuild Project*. – DimaSan Jan 05 '17 at 19:23
  • @DimaSan Build > Rebuild Project is certainly an option but this builds the entire project. Surely there must be a way just to build a single file. – Ithar Jan 06 '17 at 09:31

1 Answers1

0

Recompiling thymeleaf files is possible by Ctrl + Shift + F9. What worked for me was to rebuild the project from scratch hence indicating some sort of project setting causing this issue.

Looking at .idea/compiler.xml I can see the old file contained:

<wildcardResourcePatterns>
      <entry name="!?*.java" />
      <entry name="!?*.class" />
      <entry name="!?*.groovy" />
      <entry name="!?*.scala" />
      <entry name="!?*.flex" />
      <entry name="!?*.kt" />
      <entry name="!?*.clj" />
      <entry name="!?*.aj" />
</wildcardResourcePatterns>

which may be the have caused this issue in conjunction with something else.

Ithar
  • 4,865
  • 4
  • 39
  • 40
  • Another alternative is to look at this solution: http://stackoverflow.com/a/43234019/1512175 – Ithar Apr 28 '17 at 15:15
  • This may also help: https://stackoverflow.com/questions/35895730/spring-boot-devtools-static-content-reloading-does-not-work-in-intellij/35895848 – Ithar Jun 27 '17 at 11:08