优化审计日志实现类bean加载方式
This commit is contained in:
-2
@@ -4,7 +4,6 @@ import com.central.log.model.Audit;
|
|||||||
import com.central.log.service.IAuditService;
|
import com.central.log.service.IAuditService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
|
|
||||||
@@ -18,7 +17,6 @@ import java.time.format.DateTimeFormatter;
|
|||||||
* Github: https://github.com/zlt2000
|
* Github: https://github.com/zlt2000
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
|
||||||
@ConditionalOnProperty(name = "zlt.audit-log.log-type", havingValue = "logger", matchIfMissing = true)
|
@ConditionalOnProperty(name = "zlt.audit-log.log-type", havingValue = "logger", matchIfMissing = true)
|
||||||
public class LoggerAuditServiceImpl implements IAuditService {
|
public class LoggerAuditServiceImpl implements IAuditService {
|
||||||
private static final String MSG_PATTERN = "{}|{}|{}|{}|{}|{}|{}|{}";
|
private static final String MSG_PATTERN = "{}|{}|{}|{}|{}|{}|{}|{}";
|
||||||
|
|||||||
@@ -3,4 +3,5 @@ com.central.log.config.TtlMDCAdapterInitializer
|
|||||||
|
|
||||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||||
com.central.log.config.LogAutoConfigure,\
|
com.central.log.config.LogAutoConfigure,\
|
||||||
|
com.central.log.service.impl.LoggerAuditServiceImpl,\
|
||||||
com.central.log.aspect.AuditLogAspect
|
com.central.log.aspect.AuditLogAspect
|
||||||
|
|||||||
Reference in New Issue
Block a user