diff --git a/core/src/main/java/org/pqh/core/config/HibernateConfig.java b/core/src/main/java/org/pqh/core/config/HibernateConfig.java index bd115b2..690c554 100644 --- a/core/src/main/java/org/pqh/core/config/HibernateConfig.java +++ b/core/src/main/java/org/pqh/core/config/HibernateConfig.java @@ -3,7 +3,6 @@ package org.pqh.core.config; import org.apache.commons.dbcp2.BasicDataSource; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.pqh.core.util.PropertiesUtil; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/core/src/main/java/org/pqh/core/util/PropertiesUtil.java b/core/src/main/java/org/pqh/core/util/PropertiesUtil.java deleted file mode 100644 index 6443724..0000000 --- a/core/src/main/java/org/pqh/core/util/PropertiesUtil.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.pqh.core.util; - -import java.io.BufferedInputStream; -import java.util.Properties; - -/** - * Properties工具类 - */ -public final class PropertiesUtil { -// protected static final Logger log = LoggerFactory.getLogger(PropertiesUtil.class); - - private PropertiesUtil() { - - } - - /** - * 根据资源文件名,和name获取对应的value,如果没有对应的值,将返回null - * - * @param resourceFile 资源文件名 - * @param name 对应的value - * @return 对应的值 - */ - public static String getValue(String resourceFile, String name) { - if (resourceFile == null || name == null) { - return null; - } - return loadPropertiesFromResourceFile(resourceFile).getProperty(name); - } - - /** - * 根据资源文件路径,读取资源文件,如果资源文件不存在,将返回默认的[new Properties()] - * - * @param resourceFile 资源文件名 - * @return 资源文件 - */ - public static Properties loadPropertiesFromResourceFile(String resourceFile) { - Properties properties = new Properties(); - try (BufferedInputStream bis = new BufferedInputStream( - PropertiesUtil.class.getClassLoader().getResourceAsStream(resourceFile))) { - properties.load(bis); - return properties; - } catch (Exception e) { -// log.error(e.getMessage(), e); - } - return properties; - } -} \ No newline at end of file