Skip to content

Instantly share code, notes, and snippets.

@haies
haies / getFilterFiles.java
Last active March 16, 2018 08:38
getFilterFiles
private File[] getFilterFiles(String path, String[] suffix) {
File baseFolder = new File(path);
if(!baseFolder.isDirectory())return null;
FileFilter imageFilter = pathname -> {
String fileName = pathname.getName().toLowerCase();
for (String s : suffix) {
if (fileName.endsWith(s.toLowerCase())) return true;
}
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<properties resource="config/jdbc.properties"/>
<!-- 数据库驱动-->
<classPathEntry location="D:\XRepository\maven\postgresql\postgresql\9.1-901-1.jdbc4\postgresql-9.1-901-1.jdbc4.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressDate" value="true"/>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<setting name="cacheEnabled" value="false"/>
<setting name="lazyLoadingEnabled" value="false"/>
<setting name="aggressiveLazyLoading" value="true"/>
<setting name="logImpl" value="SLF4J"/>