package com.xiaopeng.common.log.config; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * 日志模块自动配置 * 通过 spring.factories 自动加载,注册 LogHeaderProperties 到 Spring 容器 */ @Configuration public class LogAutoConfiguration { @Bean @RefreshScope public LogHeaderProperties logHeaderProperties() { return new LogHeaderProperties(); } }