Skip to content
Snippets Groups Projects
Verified Commit a00baf7f authored by Olivier Maury's avatar Olivier Maury
Browse files

fix: ajout de la substitution VERSION manquante

parent d422dedf
1 merge request!148ajout de la substitution VERSION manquante
Pipeline #292548 passed
......@@ -3,14 +3,16 @@ package fr.agrometinfo.www.server;
import java.time.LocalDateTime;
import java.util.List;
import fr.agrometinfo.www.server.exception.AgroMetInfoException;
import fr.agrometinfo.www.server.service.MailService;
import fr.agrometinfo.www.server.util.ST;
import fr.agrometinfo.www.server.util.ST.Key;
import jakarta.inject.Inject;
import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
import jakarta.servlet.annotation.WebListener;
import fr.agrometinfo.www.server.exception.AgroMetInfoException;
import fr.agrometinfo.www.server.service.MailService;
import fr.agrometinfo.www.server.util.AppVersion;
import fr.agrometinfo.www.server.util.ST;
import fr.agrometinfo.www.server.util.ST.Key;
import lombok.extern.log4j.Log4j2;
/**
......@@ -54,6 +56,7 @@ public final class StartListener implements ServletContextListener {
final ST st = new ST(TEMPLATE);
st.add(Key.SUPPORT_EMAIL, String.join(", ", mail.getToAddresses()));
st.add(Key.MESSAGE, String.valueOf(LocalDateTime.now()));
st.add(Key.VERSION, AppVersion.getVersion());
mail.setContent(st.render());
try {
mailService.send(mail);
......
......@@ -7,7 +7,7 @@ import java.util.Locale;
import java.util.ResourceBundle;
/**
* Information on version of DSI API Client.
* Information on version of application.
*
* @author Olivier Maury
*/
......
......@@ -32,7 +32,11 @@ public class ST {
/**
* E-mail address for support team.
*/
SUPPORT_EMAIL;
SUPPORT_EMAIL,
/**
* Build version.
*/
VERSION;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment