feat: affichage du numéro de version de l'application
AS Talange CI/CD Pipeline / Build & Run Unit Tests (push) Successful in 3m8s
AS Talange CI/CD Pipeline / Deploy to Test Environment (push) Successful in 22s

This commit is contained in:
2026-06-25 09:19:59 +02:00
parent ab1094d29a
commit f8336fb407
4 changed files with 14 additions and 0 deletions
@@ -1,14 +1,23 @@
package com.astalange.web.controller;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ModelAttribute;
@ControllerAdvice
public class GlobalControllerAdvice {
@Value("${app.version}")
private String appVersion;
@ModelAttribute("requestURI")
public String requestURI(final HttpServletRequest request) {
return request.getRequestURI();
}
@ModelAttribute("appVersion")
public String appVersion() {
return appVersion;
}
}
@@ -1,6 +1,7 @@
spring:
application:
name: as-talange
app.version: @project.version@
datasource:
url: jdbc:postgresql://localhost:5433/astalange
username: myuser
@@ -51,6 +51,7 @@
<form th:action="@{/logout}" method="post">
<button type="submit" class="text-sm text-red-600 hover:text-red-700 font-medium">Déconnexion</button>
</form>
<div class="mt-2 text-[10px] text-gray-400">v<span th:text="${appVersion}">1.0-SNAPSHOT</span></div>
</div>
</aside>
</body>
@@ -131,6 +131,9 @@
<p class="text-[10px] text-gray-400 text-center mt-4 leading-tight">
Les données sont stockées de manière sécurisée, accessibles uniquement au bureau du club. Vous pouvez demander leur suppression à tout moment.
</p>
<p class="text-[10px] text-gray-400 text-center mt-2">
v<span th:text="${appVersion}">1.0-SNAPSHOT</span>
</p>
</form>
</div>