顯示具有 LiveReload 標籤的文章。 顯示所有文章
顯示具有 LiveReload 標籤的文章。 顯示所有文章

2021年2月28日 星期日

Reload Templates without Restarting the Container

https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-hotswapping

Thymeleaf Templates

If you use Thymeleaf, set spring.thymeleaf.cache to false. See ThymeleafAutoConfiguration for other Thymeleaf customization options.

FreeMarker Templates

If you use FreeMarker, set spring.freemarker.cache to false. See FreeMarkerAutoConfiguration for other FreeMarker customization options.

Groovy Templates

If you use Groovy templates, set spring.groovy.template.cache to false. See GroovyTemplateAutoConfiguration for other Groovy customization options.

DEMO:
https://github.com/imrexhuang/Spring-Boot-Security-Thymeleaf-Demo

2021年2月23日 星期二

Quarkus開發模式的Hot reload

指令
./mvnw compile quarkus:dev

log檔
2021-02-23 01:52:03,239 INFO  [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-5) Changed source files detected, recompiling [/home/javadev/fruits-app/src/main/java/com/example/FruitResource.java]
2021-02-23 01:52:04,184 INFO  [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-5) Application restart not required, replacing classes via instrumentation
2021-02-23 01:52:04,258 INFO  [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-5) Hot replace performed via instrumentation, no restart needed, total time: 1.020s