im.aop.loggers.messageinterpolation.ReflectionToStringProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of im-aop-loggers Show documentation
Show all versions of im-aop-loggers Show documentation
A handy and configurable sets of annotation-based loggers for Spring Boot that can
log every execution of a method when entering or exiting normally or abnormally, without you
writing a single line of code using aspect-oriented programming (AOP)
The newest version!
package im.aop.loggers.messageinterpolation;
import im.aop.loggers.AopLoggersProperties;
import jakarta.annotation.PostConstruct;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.boot.context.properties.ConfigurationProperties;
@Getter
@Setter
@ConfigurationProperties(prefix = ReflectionToStringProperties.PREFIX)
public class ReflectionToStringProperties {
public static final String PREFIX = AopLoggersProperties.PREFIX + ".reflection-to-string";
private String[] baseClasses = new String[]{};
private boolean excludeNullValues = true;
private boolean excludeEmptyValues = true;
private boolean excludeZeroValues = true;
private String[] excludeFieldNames = new String[]{};
@PostConstruct
void postConstruct() {
excludeFieldNames =
ArrayUtils.insert(0, excludeFieldNames, "username", "password", "passphrase", "secret");
}
}