Skip to content

Commit

Permalink
[SHIBUI-1030]
Browse files Browse the repository at this point in the history
Replaced @Value with @Setter based on feedback from Dima.
  • Loading branch information
Bill Smith committed Jan 10, 2019
1 parent feac2ef commit 094cb14
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

import edu.internet2.tier.shibboleth.admin.ui.service.EmailService;
import edu.internet2.tier.shibboleth.admin.ui.service.EmailServiceImpl;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -21,15 +22,20 @@
* @author Bill Smith (wsmith@unicon.net)
*/
@Configuration
@ConfigurationProperties("shibui")
public class EmailConfiguration {

private static final String EMAIL_TEMPLATE_ENCODING = "UTF-8";

@Value("${shibui.text.email.template.path.prefix:/mail/text/}")
private String textEmailTemplatePathPrefix;
//Configured via @ConfigurationProperties (using setter method) with 'shibui.text.email.template.path.prefix' property and
// default value set here if that property is not explicitly set in application.properties
@Setter
private String textEmailTemplatePathPrefix = "/mail/text/";

@Value("${shibui.html.email.template.path.prefix:/mail/html/}")
private String htmlEmailTemplatePathPrefix;
//Configured via @ConfigurationProperties (using setter method) with 'shibui.html.email.template.path.prefix' property and
// default value set here if that property is not explicitly set in application.properties
@Setter
private String htmlEmailTemplatePathPrefix = "/mail/html/";

@Autowired
private ApplicationContext applicationContext;
Expand Down

0 comments on commit 094cb14

Please sign in to comment.