2020
09-28
09-28
Spring如何替换掉默认common-logging.jar
为什么使用日志打印而不是使用System.out.println()?System.out是一个io流如果使用它打印大批量数据会占用大量的资源spring默认使用common-logging打印日志信息如果我们想替换掉它使用其他的日志工具分为如下几步1.排除项目对common-logging的依赖<dependency><groupId>org.springframework</groupId><artifactId>spring-orm</artifactId><exclusions><exclusion><groupId>commons-logging</groupId>...
继续阅读 >
配置类config_file:fromconfigparserimportConfigParserclassconfig_file:def__init__(self,conf_filePath,encoding="utf-8"):#打开配置文件,实例化ConfigParser类,并以默认utf-8的编码格式读取文件self.cf=ConfigParser()self.cf.read(conf_filePath,encoding)defget_Int_Value(self,section,option):#获取整数returnself.cf.getint(section,option)defget_boolValue(self,section,option...