Record Class MailProperties
java.lang.Object
java.lang.Record
com.irurueta.authserver.authorization.infrastructure.mail.MailProperties
- Record Components:
from- sender address of every message.baseUrl- public base URL of the authorization server, used to build the links of the messages (without a trailing slash).locale- language of the messages; it is explicit configuration, never the platform's default.
@ConfigurationProperties(prefix="authserver.mail")
public record MailProperties(String from, String baseUrl, Locale locale)
extends Record
Settings of the e-mails sent by
SmtpAccountMailer. The SMTP connection itself is configured with the
standard spring.mail.* properties and holds no credentials in this repository.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thebaseUrlrecord component.static final StringBase URL used when none is configured.static final StringSender used when none is configured.private final StringThe field for thefromrecord component.private final LocaleThe field for thelocalerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMailProperties(String from, String baseUrl, Locale locale) Applies the defaults of the missing values and removes a trailing slash of the base URL. -
Method Summary
Modifier and TypeMethodDescriptionbaseUrl()Returns the value of thebaseUrlrecord component.final booleanIndicates whether some other object is "equal to" this one.from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.locale()Returns the value of thelocalerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
MailProperties
Applies the defaults of the missing values and removes a trailing slash of the base URL.- Parameters:
from- sender address, ornullforDEFAULT_FROM.baseUrl- public base URL, ornullforDEFAULT_BASE_URL.locale- language of the messages, ornullfor English.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
baseUrl
Returns the value of thebaseUrlrecord component.- Returns:
- the value of the
baseUrlrecord component
-
locale
Returns the value of thelocalerecord component.- Returns:
- the value of the
localerecord component
-