File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
src/main/java/com/jayfella/website Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import org .springframework .context .annotation .Bean ;
4
4
import org .springframework .context .annotation .Configuration ;
5
+ import org .springframework .context .annotation .DependsOn ;
5
6
import org .springframework .context .support .ResourceBundleMessageSource ;
6
7
import org .springframework .mail .javamail .JavaMailSender ;
7
8
import org .springframework .mail .javamail .JavaMailSenderImpl ;
Original file line number Diff line number Diff line change 1
1
package com .jayfella .website .config ;
2
2
3
3
import nz .net .ultraq .thymeleaf .LayoutDialect ;
4
- import org .springframework .beans .factory .annotation .Autowired ;
5
4
import org .springframework .context .annotation .Bean ;
6
5
import org .springframework .context .annotation .Configuration ;
7
6
import org .springframework .context .annotation .Description ;
23
22
@ EnableWebMvc
24
23
public class ThymeLeafConfig implements WebMvcConfigurer {
25
24
26
- @ Autowired
27
- public SpringTemplateEngine templateEngine ;
28
-
25
+
29
26
@ Bean
30
27
@ Description ("Thymeleaf template resolver serving HTML 5" )
31
28
public ITemplateResolver templateResolver () {
Original file line number Diff line number Diff line change 10
10
import org .slf4j .Logger ;
11
11
import org .slf4j .LoggerFactory ;
12
12
import org .springframework .beans .factory .annotation .Autowired ;
13
+ import org .springframework .context .annotation .DependsOn ;
13
14
import org .springframework .mail .javamail .JavaMailSender ;
14
15
import org .springframework .mail .javamail .MimeMessageHelper ;
15
16
import org .springframework .scheduling .annotation .Async ;
24
25
import java .util .List ;
25
26
import java .util .Locale ;
26
27
27
- @ Service
28
+ @ Service @ DependsOn ( "templateEngine" )
28
29
public class EmailService {
29
30
30
31
private static final Logger log = LoggerFactory .getLogger (EmailService .class );
You can’t perform that action at this time.
0 commit comments