1:加载配置文件
Resource resource = new ClassPathResource("log4j.properties"); Properties defaultStrategies = PropertiesLoaderUtils.loadProperties(resource);