File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Spring_part_7/src/main/java/spring/oldboy/pool Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 11package spring .oldboy .pool ;
22
3+ /* Lesson 31 - Логирование событий приложения, подключение логера */
4+
35import jakarta .annotation .PostConstruct ;
46import jakarta .annotation .PreDestroy ;
57import lombok .Getter ;
68import lombok .RequiredArgsConstructor ;
79import lombok .extern .slf4j .Slf4j ;
810import org .springframework .beans .factory .annotation .Value ;
911import org .springframework .stereotype .Component ;
12+
13+ /* Подключили аннотацию, активирующую логирование */
1014@ Slf4j
1115@ Component ("pool1" )
1216@ RequiredArgsConstructor
@@ -30,6 +34,7 @@ public class ConnectionPool {
3034
3135 @ PostConstruct
3236 private void init () {
37+ /* Lesson 31: Передача события (сообщения о событии) в логер */
3338 log .info ("Init connection pool" );
3439 }
3540
You can’t perform that action at this time.
0 commit comments