File tree 3 files changed +12
-7
lines changed
main/java/ru/mystamps/web
test/groovy/ru/mystamps/web/service
3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,10 @@ public StampsCatalogService getGibbonsCatalogService() {
210
210
211
211
@ Bean
212
212
public TransactionParticipantService getTransactionParticipantService () {
213
- return new TransactionParticipantServiceImpl (daoConfig .getTransactionParticipantDao ());
213
+ return new TransactionParticipantServiceImpl (
214
+ LoggerFactory .getLogger (TransactionParticipantServiceImpl .class ),
215
+ daoConfig .getTransactionParticipantDao ()
216
+ );
214
217
}
215
218
216
219
}
Original file line number Diff line number Diff line change 22
22
import org .apache .commons .lang3 .Validate ;
23
23
24
24
import org .slf4j .Logger ;
25
- import org .slf4j .LoggerFactory ;
26
25
27
26
import org .springframework .transaction .annotation .Transactional ;
28
27
38
37
39
38
@ RequiredArgsConstructor
40
39
public class TransactionParticipantServiceImpl implements TransactionParticipantService {
41
- private static final Logger LOG =
42
- LoggerFactory .getLogger (TransactionParticipantServiceImpl .class );
43
40
41
+ private final Logger log ;
44
42
private final TransactionParticipantDao transactionParticipantDao ;
45
43
46
44
@ Override
@@ -56,7 +54,7 @@ public void add(AddParticipantDto dto) {
56
54
57
55
transactionParticipantDao .add (participant );
58
56
59
- LOG .info ("Participant with name '{}' has been created" , participant .getName ());
57
+ log .info ("Participant with name '{}' has been created" , participant .getName ());
60
58
}
61
59
62
60
@ Override
Original file line number Diff line number Diff line change 17
17
*/
18
18
package ru.mystamps.web.service
19
19
20
+ import org.slf4j.helpers.NOPLogger
21
+
20
22
import spock.lang.Specification
21
23
22
24
import ru.mystamps.web.dao.TransactionParticipantDao
@@ -28,8 +30,10 @@ import ru.mystamps.web.controller.dto.AddParticipantForm
28
30
class TransactionParticipantServiceImplTest extends Specification {
29
31
30
32
private final TransactionParticipantDao transactionParticipantDao = Mock ()
31
- private final TransactionParticipantService service =
32
- new TransactionParticipantServiceImpl (transactionParticipantDao)
33
+ private final TransactionParticipantService service = new TransactionParticipantServiceImpl (
34
+ NOPLogger . NOP_LOGGER ,
35
+ transactionParticipantDao
36
+ )
33
37
34
38
//
35
39
// Tests for add()
You can’t perform that action at this time.
0 commit comments