vaadin / hilla

Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://hilla.dev
Apache License 2.0
922 stars 58 forks source link

Creating/updating views.json under resources causes unnecessary extra restarts during the startup #2213

Closed taefi closed 7 months ago

taefi commented 8 months ago

Describe the bug

With the new FS Router in place, it generates a views.json under resources directory, so the java side can load it easily by reading it as a resource from the classPath. Having Spring devtools engaged in development environment, it is triggered unnecessarily during the startup, since the views.json file is created by a Vite plugin after the Spring DevTools' restart listener has already initialized and watching the file system changes.

Expected-behavior

It should not be causing any extra restart while the application is in startup phase. This can cause many troubles from a total failure in startup or having random failure in ITs.

Reproduction

  1. Take an starter with the Vaadin 24.4.0.alpha13 or earlier.
  2. (While having target/build cleaned) Start the application.
  3. Notice the extra restart in the logs.

System Info

Vaadin 24.4.0.alpha13 or earlier.

vaadin-bot commented 7 months ago

This ticket/PR has been released with Hilla 24.4.0.alpha18 and is also targeting the upcoming stable 24.4.0 version.