From 0d9982fb509c4063ac9fa975e312447ccfe96b6c Mon Sep 17 00:00:00 2001 From: Claudio Maggioni Date: Mon, 9 Mar 2020 17:06:59 +0100 Subject: [PATCH] Fixed email configuration --- .../smarthut/config/EmailConfigurationService.java | 2 ++ src/main/resources/application.properties | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/config/EmailConfigurationService.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/config/EmailConfigurationService.java index 424d2d3..8bae55d 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/config/EmailConfigurationService.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/config/EmailConfigurationService.java @@ -4,6 +4,7 @@ import javax.validation.constraints.NotNull; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.stereotype.Component; +import org.springframework.validation.annotation.Validated; /** * Class to interface with `email.*` properties in application.properties. This properties are used @@ -12,6 +13,7 @@ import org.springframework.stereotype.Component; * @see ch.usi.inf.sa4.sanmarinoes.smarthut.controller.UserAccountController */ @Component +@Validated @EnableConfigurationProperties @ConfigurationProperties(prefix = "email") public class EmailConfigurationService { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 14c91cd..f760ec8 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -24,10 +24,10 @@ spring.mail.properties.mail.smtp.connectiontimeout=5000 spring.mail.properties.mail.smtp.timeout=5000 spring.mail.properties.mail.smtp.writetimeout=5000 -email.registrationsubject=Complete your SmartHut.sm registration +email.registrationSubject=Complete your SmartHut.sm registration email.registration=To confirm your registration, please click here: -email.registraionpath=http://localhost:8080/register/confirm-account?token= +email.registrationPath=http://localhost:8080/register/confirm-account?token= -email.resetpasswordsubject=SmartHut.sm password reset +email.resetpasswordSubject=SmartHut.sm password reset email.resetpassword=To reset your password, please click here: -email.resetpasswordpath=http://localhost:3000/password-reset?token= \ No newline at end of file +email.resetpasswordPath=http://localhost:3000/password-reset?token= \ No newline at end of file