From 30e16ab3fea583da295e0fdf88eaf0aa980d4927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Sun, 16 Oct 2022 17:09:51 +0200 Subject: [PATCH 001/139] Use WebJars versioned URLs In order to improve efficiency (see spring-projects/spring-framework#27619) and allow native image compatibility, this commit uses WebJars versioned URLs which are supported out of the box on Spring Boot via /META-INF/resources default resource location configuration, removing the need to use webjars-locator-core dependency and WebJarsResourceResolver. I have been able to measure a consistent 5% startup time improvement on the JVM with that simple change on my local machine. --- build.gradle | 1 - pom.xml | 4 ---- src/main/resources/templates/fragments/layout.html | 4 ++-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 46ed6e0..5f62c06 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,6 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'javax.cache:cache-api' runtimeOnly 'org.springframework.boot:spring-boot-starter-actuator' - runtimeOnly 'org.webjars:webjars-locator-core' runtimeOnly "org.webjars.npm:bootstrap:${webjarsBootstrapVersion}" runtimeOnly "org.webjars.npm:font-awesome:${webjarsFontawesomeVersion}" runtimeOnly 'org.ehcache:ehcache' diff --git a/pom.xml b/pom.xml index c67bce2..d29355c 100644 --- a/pom.xml +++ b/pom.xml @@ -89,10 +89,6 @@ - - org.webjars - webjars-locator-core - org.webjars.npm bootstrap diff --git a/src/main/resources/templates/fragments/layout.html b/src/main/resources/templates/fragments/layout.html index d5f378f..8ab6dee 100755 --- a/src/main/resources/templates/fragments/layout.html +++ b/src/main/resources/templates/fragments/layout.html @@ -17,7 +17,7 @@ - + @@ -87,7 +87,7 @@ - + From a5cbb8505a1df3c348c06607933a07fc8c87c222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Sun, 16 Oct 2022 17:12:23 +0200 Subject: [PATCH 002/139] Use WebJars versioned URLs (#1099) In order to improve efficiency (see spring-projects/spring-framework#27619) and allow native image compatibility, this commit uses WebJars versioned URLs which are supported out of the box on Spring Boot via /META-INF/resources default resource location configuration, removing the need to use webjars-locator-core dependency and WebJarsResourceResolver. I have been able to measure a consistent 5% startup time improvement on the JVM with that simple change on my local machine. --- build.gradle | 1 - pom.xml | 4 ---- src/main/resources/templates/fragments/layout.html | 4 ++-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 46ed6e0..5f62c06 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,6 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'javax.cache:cache-api' runtimeOnly 'org.springframework.boot:spring-boot-starter-actuator' - runtimeOnly 'org.webjars:webjars-locator-core' runtimeOnly "org.webjars.npm:bootstrap:${webjarsBootstrapVersion}" runtimeOnly "org.webjars.npm:font-awesome:${webjarsFontawesomeVersion}" runtimeOnly 'org.ehcache:ehcache' diff --git a/pom.xml b/pom.xml index c67bce2..d29355c 100644 --- a/pom.xml +++ b/pom.xml @@ -89,10 +89,6 @@ - - org.webjars - webjars-locator-core - org.webjars.npm bootstrap diff --git a/src/main/resources/templates/fragments/layout.html b/src/main/resources/templates/fragments/layout.html index d5f378f..8ab6dee 100755 --- a/src/main/resources/templates/fragments/layout.html +++ b/src/main/resources/templates/fragments/layout.html @@ -17,7 +17,7 @@ - + @@ -87,7 +87,7 @@ - + From 9ecdc1111e3da388a750ace41a125287d9620534 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Tue, 25 Oct 2022 21:26:05 +0200 Subject: [PATCH 003/139] Polish Thymeleaf templates. Make sure we use the suggested fragment inclusion syntax. Use th:insert instead of th:include. Use simpler URI path segment templating to avoid duplication of expressions. Avoid trailing slashes in URIs creates as upcoming Spring Boot versions will not map the trailing slash flavors of defined URI mappings. --- src/main/resources/templates/fragments/layout.html | 10 +++++----- .../resources/templates/owners/ownerDetails.html | 12 ++++-------- src/main/resources/templates/owners/ownersList.html | 10 +++++----- src/main/resources/templates/vets/vetList.html | 10 +++++----- 4 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/main/resources/templates/fragments/layout.html b/src/main/resources/templates/fragments/layout.html index 8ab6dee..5c8d391 100755 --- a/src/main/resources/templates/fragments/layout.html +++ b/src/main/resources/templates/fragments/layout.html @@ -45,23 +45,23 @@