File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
src/main/java/ru/mystamps/web Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 24
24
import org .springframework .context .annotation .Configuration ;
25
25
import org .springframework .core .env .Environment ;
26
26
import org .springframework .mail .javamail .JavaMailSender ;
27
+ import org .springframework .scheduling .annotation .EnableAsync ;
27
28
28
29
// CheckStyle: ignore AvoidStarImportCheck for next 2 lines
29
30
import ru .mystamps .web .dao .*; // NOPMD: UnusedImports
30
31
import ru .mystamps .web .service .*; // NOPMD: UnusedImports
31
32
import ru .mystamps .web .support .spring .security .SecurityConfig ;
32
33
33
34
@ Configuration
35
+ @ EnableAsync
34
36
public class ServicesConfig {
35
37
36
38
@ Inject
Original file line number Diff line number Diff line change 33
33
import org .springframework .mail .javamail .JavaMailSender ;
34
34
import org .springframework .mail .javamail .MimeMessageHelper ;
35
35
import org .springframework .mail .javamail .MimeMessagePreparator ;
36
+ import org .springframework .scheduling .annotation .Async ;
36
37
37
38
import lombok .RequiredArgsConstructor ;
38
39
@@ -50,6 +51,7 @@ public class MailServiceImpl implements MailService {
50
51
private final boolean testMode ;
51
52
52
53
@ Override
54
+ @ Async
53
55
public void sendActivationKeyToUser (UsersActivation activation ) {
54
56
Validate .isTrue (activation != null , "Activation must be non null" );
55
57
Validate .isTrue (activation .getEmail () != null , "E-mail must be non null" );
You can’t perform that action at this time.
0 commit comments