Spring 春天的茉莉花。。。记录器配置
在Spring中使用Jasypt时,PropertiesLoaderSupport类的load properties方法中的记录器级别设置为InfoSpring 春天的茉莉花。。。记录器配置,spring,logging,log4j,jasypt,Spring,Logging,Log4j,Jasypt,在Spring中使用Jasypt时,PropertiesLoaderSupport类的load properties方法中的记录器级别设置为Info protected void loadProperties(Properties props) throws IOException { if (this.locations != null) { for (Resource location : this.locations) {
protected void loadProperties(Properties props) throws IOException {
if (this.locations != null) {
for (Resource location : this.locations) {
if (logger.isInfoEnabled()) {
logger.info("Loading properties file from " + location);
}
上面的代码块在使用Jasypt时返回true,而在使用Spring时返回false,这是因为我收到了很多不需要的日志消息
有人能建议我如何通过配置返回false吗
我的应用程序也使用log4j
谢谢经过多次搜索,我终于找到了结果。。。要解决此问题,我们必须在应用程序所用的记录器配置中设置Jasypt的记录器属性。比如说 name=“log4j.logger.org.jasypt”>错误
这将解决问题。@Farvailain-你能看一下吗