From 89f7b4ee96b8dd354d56ff2211bb1ffe762ba24c Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Tue, 27 Sep 2022 17:14:13 +0000 Subject: [PATCH 01/74] Tweak devcontainer so java and permissions work --- .devcontainer/Dockerfile | 8 ++++++++ .devcontainer/devcontainer.json | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 85c7f40ca..9782cf3de 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,3 +3,11 @@ FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT} ARG NODE_VERSION="none" RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi + +ARG USER=vscode +VOLUME /home/$USER/.m2 +VOLUME /home/$USER/.gradle + +ARG JAVA_VERSION=17.0.4.1-ms +RUN sudo mkdir /home/$USER/.m2 /home/$USER/.gradle && sudo chown $USER:$USER /home/$USER/.m2 /home/$USER/.gradle +RUN bash -lc '. /usr/local/sdkman/bin/sdkman-init.sh && sdk install java $JAVA_VERSION && sdk use java $JAVA_VERSION' diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4f13d43c7..138b7ca23 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -21,7 +21,8 @@ "extensions": [ "vscjava.vscode-java-pack", "redhat.vscode-xml", - "Pivotal.vscode-boot-dev-pack" + "Pivotal.vscode-boot-dev-pack", + "mhutchie.git-graph" ], "forwardPorts": [8080], "settings": { 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 02/74] 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 46ed6e03f..5f62c0615 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 c67bce23c..d29355c5f 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 d5f378f4b..8ab6deebe 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 03/74] 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 8ab6deebe..5c8d391eb 100755 --- a/src/main/resources/templates/fragments/layout.html +++ b/src/main/resources/templates/fragments/layout.html @@ -45,23 +45,23 @@