项目中使用到了beanutils包, 在进行对象反射赋值时, console中输出了很多DEBUG信息
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:353] - Setting default value: [F@459a278e
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:140] - Converting 'float[]' value '[F@459a278e' to type 'float[]'
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a float[]
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:353] - Setting default value: [I@b9aff55
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:140] - Converting 'int[]' value '[I@b9aff55' to type 'int[]'
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a int[]
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:353] - Setting default value: [J@6cf12b66
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:140] - Converting 'long[]' value '[J@6cf12b66' to type 'long[]'
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a long[]
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:353] - Setting default value: [S@4d586d6a
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:140] - Converting 'short[]' value '[S@4d586d6a' to type 'short[]'
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a short[]
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.math.BigDecimal;@687771d1
2017-06-22 10:56:31.866 [main] DEBUG [AbstractConverter:140] - Converting 'BigDecimal[]' value '[Ljava.math.BigDecimal;@687771d1' to type 'BigDecimal[]'
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a BigDecimal[]
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.math.BigInteger;@79d185eb
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:140] - Converting 'BigInteger[]' value '[Ljava.math.BigInteger;@79d185eb' to type 'BigInteger[]'
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a BigInteger[]
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.lang.Boolean;@2aaf45c8
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:140] - Converting 'Boolean[]' value '[Ljava.lang.Boolean;@2aaf45c8' to type 'Boolean[]'
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a Boolean[]
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.lang.Byte;@590e635c
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:140] - Converting 'Byte[]' value '[Ljava.lang.Byte;@590e635c' to type 'Byte[]'
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a Byte[]
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.lang.Character;@3f9d5ab1
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:140] - Converting 'Character[]' value '[Ljava.lang.Character;@3f9d5ab1' to type 'Character[]'
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a Character[]
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.lang.Double;@73ad3b17
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:140] - Converting 'Double[]' value '[Ljava.lang.Double;@73ad3b17' to type 'Double[]'
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a Double[]
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.lang.Float;@72029e55
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:140] - Converting 'Float[]' value '[Ljava.lang.Float;@72029e55' to type 'Float[]'
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a Float[]
2017-06-22 10:56:31.867 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.lang.Integer;@9e918ed
2017-06-22 10:56:31.868 [main] DEBUG [AbstractConverter:140] - Converting 'Integer[]' value '[Ljava.lang.Integer;@9e918ed' to type 'Integer[]'
2017-06-22 10:56:31.868 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a Integer[]
2017-06-22 10:56:31.868 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.lang.Long;@266374b0
2017-06-22 10:56:31.868 [main] DEBUG [AbstractConverter:140] - Converting 'Long[]' value '[Ljava.lang.Long;@266374b0' to type 'Long[]'
2017-06-22 10:56:31.868 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a Long[]
2017-06-22 10:56:31.868 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.lang.Short;@4b81e280
2017-06-22 10:56:31.868 [main] DEBUG [AbstractConverter:140] - Converting 'Short[]' value '[Ljava.lang.Short;@4b81e280' to type 'Short[]'
2017-06-22 10:56:31.868 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a Short[]
2017-06-22 10:56:31.868 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.lang.String;@3c3d683a
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:140] - Converting 'String[]' value '[Ljava.lang.String;@3c3d683a' to type 'String[]'
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a String[]
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.lang.Class;@6385d6bb
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:140] - Converting 'Class[]' value '[Ljava.lang.Class;@6385d6bb' to type 'Class[]'
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a Class[]
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.util.Date;@67d4c208
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:140] - Converting 'Date[]' value '[Ljava.util.Date;@67d4c208' to type 'Date[]'
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a Date[]
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.util.Calendar;@410ed079
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:140] - Converting 'Calendar[]' value '[Ljava.util.Calendar;@410ed079' to type 'Calendar[]'
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a Calendar[]
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.io.File;@3398d94d
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:140] - Converting 'java.io.File[]' value '[Ljava.io.File;@3398d94d' to type 'java.io.File[]'
2017-06-22 10:56:31.869 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a java.io.File[]
2017-06-22 10:56:31.870 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.sql.Date;@77e268b1
2017-06-22 10:56:31.870 [main] DEBUG [AbstractConverter:140] - Converting 'java.sql.Date[]' value '[Ljava.sql.Date;@77e268b1' to type 'java.sql.Date[]'
2017-06-22 10:56:31.870 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a java.sql.Date[]
2017-06-22 10:56:31.870 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.sql.Time;@314779f4
2017-06-22 10:56:31.870 [main] DEBUG [AbstractConverter:140] - Converting 'java.sql.Time[]' value '[Ljava.sql.Time;@314779f4' to type 'java.sql.Time[]'
2017-06-22 10:56:31.870 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a java.sql.Time[]
2017-06-22 10:56:31.870 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.sql.Timestamp;@4b979b72
2017-06-22 10:56:31.870 [main] DEBUG [AbstractConverter:140] - Converting 'java.sql.Timestamp[]' value '[Ljava.sql.Timestamp;@4b979b72' to type 'java.sql.Timestamp[]'
2017-06-22 10:56:31.870 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a java.sql.Timestamp[]
2017-06-22 10:56:31.870 [main] DEBUG [AbstractConverter:353] - Setting default value: [Ljava.net.URL;@4e5e8023
2017-06-22 10:56:31.870 [main] DEBUG [AbstractConverter:140] - Converting 'java.net.URL[]' value '[Ljava.net.URL;@4e5e8023' to type 'java.net.URL[]'
2017-06-22 10:56:31.870 [main] DEBUG [AbstractConverter:162] - No conversion required, value is already a java.net.URL[]
解决方法就是在log的配置文件中, 将日志级别设置成INFO(大于DEBUG即可)
项目中使用了log4j2, 在log4j2.xml的配置文件中, 调整日志级别, 简单示例如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="off">
...
<loggers>
<logger name="org.slf4j" level="INFO" />
<logger name="org.quartz" level="INFO" />
<logger name="org.springframework" level="INFO" />
<logger name="org.apache.commons.beanutils" level="INFO" />
<Root level="DEBUG">
<appender-ref ref="Console" />
<appender-ref ref="RollingFile" />
<appender-ref ref="RollingFileError" />
</Root >
</loggers>
</configuration>
这样配置后, 碰到org.apache.commons.beanutils包下输出的日志, 级别都是INFO, DEBUG日志信息就被过滤掉了, 同理可以配置一些其他的日志输出过滤.