All Downloads are FREE. Search and download functionalities are using the official Maven repository.

im.aop.loggers.messageinterpolation.ReflectionToStringProperties Maven / Gradle / Ivy

Go to download

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)

There is a newer version: 1.1.3
Show newest version
package im.aop.loggers.messageinterpolation;

import javax.annotation.PostConstruct;

import org.apache.commons.lang3.ArrayUtils;
import org.springframework.boot.context.properties.ConfigurationProperties;

import im.aop.loggers.AopLoggersProperties;

@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, new String[] {"username", "password", "passphrase", "secret"});
  }

  public String[] getBaseClasses() {
    return baseClasses;
  }

  public void setBaseClasses(String[] baseClasses) {
    this.baseClasses = baseClasses;
  }

  public boolean isExcludeNullValues() {
    return excludeNullValues;
  }

  public void setExcludeNullValues(boolean excludeNullValues) {
    this.excludeNullValues = excludeNullValues;
  }

  public boolean isExcludeEmptyValues() {
    return excludeEmptyValues;
  }

  public void setExcludeEmptyValues(boolean excludeEmptyValues) {
    this.excludeEmptyValues = excludeEmptyValues;
  }

  public boolean isExcludeZeroValues() {
    return excludeZeroValues;
  }

  public void setExcludeZeroValues(boolean excludeZeroValues) {
    this.excludeZeroValues = excludeZeroValues;
  }

  public String[] getExcludeFieldNames() {
    return excludeFieldNames;
  }

  public void setExcludeFieldNames(String[] excludeFieldNames) {
    this.excludeFieldNames = excludeFieldNames;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy