Package cn.net.pap.logback.config
Class LogbackInitializer
java.lang.Object
cn.net.pap.logback.config.LogbackInitializer
- All Implemented Interfaces:
EventListener,org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>
@Component
public class LogbackInitializer
extends Object
implements org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>
Logback配置初始化器
在应用启动时自动初始化Logback配置
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinitLogbackConfiguration(DataSource dataSource) 初始化Logback配置voidonApplicationEvent(org.springframework.boot.context.event.ApplicationReadyEvent event) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Constructor Details
-
LogbackInitializer
public LogbackInitializer()
-
-
Method Details
-
onApplicationEvent
public void onApplicationEvent(org.springframework.boot.context.event.ApplicationReadyEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>
-
initLogbackConfiguration
初始化Logback配置
-