升级工具依赖;去掉一些极少用的依赖,按需加入;
This commit is contained in:
@@ -53,12 +53,12 @@
|
||||
<version>${commons-text.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Apache Tools Ant Tar Zip -->
|
||||
<!-- Apache Zip Tools
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>${ant.version}</version>
|
||||
</dependency>
|
||||
</dependency> -->
|
||||
|
||||
<!-- Java serialization -->
|
||||
<dependency>
|
||||
@@ -88,12 +88,12 @@
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Java xml -->
|
||||
<!-- Java xml
|
||||
<dependency>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>${dom4j.version}</version>
|
||||
</dependency>
|
||||
</dependency> -->
|
||||
|
||||
<!-- jdk11 JAXB module
|
||||
<dependency>
|
||||
@@ -123,12 +123,12 @@
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Jsoup HTTP -->
|
||||
<!-- Jsoup HTTP
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>${jsoup.version}</version>
|
||||
</dependency>
|
||||
</dependency> -->
|
||||
|
||||
<!-- Email -->
|
||||
<dependency>
|
||||
@@ -136,11 +136,11 @@
|
||||
<artifactId>commons-email</artifactId>
|
||||
<version>${commons-email.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
<version>${activation.version}</version>
|
||||
</dependency>
|
||||
</dependency> -->
|
||||
|
||||
<!-- User Agent -->
|
||||
<dependency>
|
||||
@@ -210,7 +210,7 @@
|
||||
<version>${zxing.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- POI Office Tools -->
|
||||
<!-- Office Tools -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
|
||||
@@ -13,6 +13,9 @@ import java.io.OutputStream;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
import javax.activation.MimetypesFileTypeMap;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
@@ -21,9 +24,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.io.Charsets;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.tools.zip.ZipEntry;
|
||||
import org.apache.tools.zip.ZipFile;
|
||||
import org.apache.tools.zip.ZipOutputStream;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
@@ -462,14 +462,18 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
}
|
||||
}
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// zipFiles("target\\classes", "*", "target\\classes.zip");
|
||||
// unZipFiles("target\\classes.zip", "target\\classes2");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 压缩文件或目录
|
||||
* @param srcDirName 压缩的根目录
|
||||
* @param fileName 根目录下的待压缩的文件名或文件夹名,其中*或""表示跟目录下的全部文件
|
||||
* @param descFileName 目标zip文件
|
||||
*/
|
||||
public static void zipFiles(String srcDirName, String fileName,
|
||||
String descFileName) {
|
||||
public static void zipFiles(String srcDirName, String fileName, String descFileName) {
|
||||
// 判断目录是否存在
|
||||
if (srcDirName == null) {
|
||||
logger.debug("文件压缩失败,目录 " + srcDirName + " 不存在!");
|
||||
@@ -483,8 +487,7 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
String dirPath = fileDir.getAbsolutePath();
|
||||
File descFile = new File(descFileName);
|
||||
try {
|
||||
ZipOutputStream zouts = new ZipOutputStream(new FileOutputStream(
|
||||
descFile));
|
||||
ZipOutputStream zouts = new ZipOutputStream(new FileOutputStream(descFile));
|
||||
if ("*".equals(fileName) || "".equals(fileName)) {
|
||||
FileUtils.zipDirectoryToZipFile(dirPath, fileDir, zouts);
|
||||
} else {
|
||||
@@ -492,8 +495,7 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
if (file.isFile()) {
|
||||
FileUtils.zipFilesToZipFile(dirPath, file, zouts);
|
||||
} else {
|
||||
FileUtils
|
||||
.zipDirectoryToZipFile(dirPath, file, zouts);
|
||||
FileUtils.zipDirectoryToZipFile(dirPath, file, zouts);
|
||||
}
|
||||
}
|
||||
zouts.close();
|
||||
@@ -525,7 +527,7 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
int readByte = 0;
|
||||
// 获取ZIP文件里所有的entry
|
||||
@SuppressWarnings("rawtypes")
|
||||
Enumeration enums = zipFile.getEntries();
|
||||
Enumeration enums = zipFile.entries();
|
||||
// 遍历所有entry
|
||||
while (enums.hasMoreElements()) {
|
||||
entry = (ZipEntry) enums.nextElement();
|
||||
@@ -585,12 +587,10 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
if (files[i].isFile()) {
|
||||
// 如果是文件,则调用文件压缩方法
|
||||
FileUtils
|
||||
.zipFilesToZipFile(dirPath, files[i], zouts);
|
||||
FileUtils.zipFilesToZipFile(dirPath, files[i], zouts);
|
||||
} else {
|
||||
// 如果是目录,则递归调用
|
||||
FileUtils.zipDirectoryToZipFile(dirPath, files[i],
|
||||
zouts);
|
||||
FileUtils.zipDirectoryToZipFile(dirPath, files[i], zouts);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -646,7 +646,6 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
filePath += "/";
|
||||
}
|
||||
int index = filePath.indexOf(dirPaths);
|
||||
|
||||
return filePath.substring(index + dirPaths.length());
|
||||
}
|
||||
|
||||
|
||||
@@ -4,21 +4,9 @@
|
||||
package com.jeesite.common.mapper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.dom4j.Attribute;
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentException;
|
||||
import org.dom4j.DocumentHelper;
|
||||
import org.dom4j.Element;
|
||||
import org.dom4j.Namespace;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
||||
@@ -124,167 +112,167 @@ public class XmlMapper extends com.fasterxml.jackson.dataformat.xml.XmlMapper{
|
||||
return (T) XmlMapper.getInstance().fromXmlString(jsonString, clazz);
|
||||
}
|
||||
|
||||
/**
|
||||
* xml转map 不带属性
|
||||
* @param xmlStr
|
||||
* @param needRootKey 是否需要在返回的map里加根节点键
|
||||
* @throws DocumentException
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Map<String, Object> xmlToMap(String xmlStr, boolean needRootKey) {
|
||||
try {
|
||||
Document doc = DocumentHelper.parseText(xmlStr);
|
||||
Element root = doc.getRootElement();
|
||||
Map<String, Object> map = (Map<String, Object>) xmlToMap(root);
|
||||
if (root.elements().size() == 0 && root.attributes().size() == 0) {
|
||||
return map;
|
||||
}
|
||||
if (needRootKey) {
|
||||
//在返回的map里加根节点键(如果需要)
|
||||
Map<String, Object> rootMap = new HashMap<String, Object>();
|
||||
rootMap.put(root.getName(), map);
|
||||
return rootMap;
|
||||
}
|
||||
return map;
|
||||
} catch (DocumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* xml转map 带属性
|
||||
* @param xmlStr
|
||||
* @param needRootKey 是否需要在返回的map里加根节点键
|
||||
* @return
|
||||
* @throws DocumentException
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Map<String, Object> xmlToMapWithAttr(String xmlStr, boolean needRootKey) {
|
||||
try {
|
||||
Document doc = DocumentHelper.parseText(xmlStr);
|
||||
Element root = doc.getRootElement();
|
||||
Map<String, Object> map = (Map<String, Object>) xmlToMapWithAttr(root);
|
||||
if (root.elements().size() == 0 && root.attributes().size() == 0) {
|
||||
return map; //根节点只有一个文本内容
|
||||
}
|
||||
if (needRootKey) {
|
||||
//在返回的map里加根节点键(如果需要)
|
||||
Map<String, Object> rootMap = new HashMap<String, Object>();
|
||||
rootMap.put(root.getName(), map);
|
||||
return rootMap;
|
||||
}
|
||||
return map;
|
||||
} catch (DocumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* xml转map 不带属性
|
||||
* @param element
|
||||
* @return
|
||||
*/
|
||||
private static Object xmlToMap(Element element) {
|
||||
// System.out.println(element.getName());
|
||||
Map<String, Object> map = new LinkedHashMap<String, Object>();
|
||||
List<Element> elements = element.elements();
|
||||
if (elements.size() == 0) {
|
||||
map.put(element.getName(), element.getText());
|
||||
if (!element.isRootElement()) {
|
||||
return element.getText();
|
||||
}
|
||||
} else if (elements.size() == 1) {
|
||||
map.put(elements.get(0).getName(), xmlToMap(elements.get(0)));
|
||||
} else if (elements.size() > 1) {
|
||||
// 多个子节点的话就得考虑list的情况了,比如多个子节点有节点名称相同的
|
||||
// 构造一个map用来去重
|
||||
Map<String, Element> tempMap = new LinkedHashMap<String, Element>();
|
||||
for (Element ele : elements) {
|
||||
tempMap.put(ele.getName(), ele);
|
||||
}
|
||||
Set<String> keySet = tempMap.keySet();
|
||||
for (String string : keySet) {
|
||||
Namespace namespace = tempMap.get(string).getNamespace();
|
||||
List<Element> elements2 = element.elements(new org.dom4j.QName(string, namespace));
|
||||
// 如果同名的数目大于1则表示要构建list
|
||||
if (elements2.size() > 1) {
|
||||
List<Object> list = new ArrayList<Object>();
|
||||
for (Element ele : elements2) {
|
||||
list.add(xmlToMap(ele));
|
||||
}
|
||||
map.put(string, list);
|
||||
} else {
|
||||
// 同名的数量不大于1则直接递归去
|
||||
map.put(string, xmlToMap(elements2.get(0)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* xml转map 带属性
|
||||
* @param element
|
||||
* @return
|
||||
*/
|
||||
private static Object xmlToMapWithAttr(Element element) {
|
||||
// System.out.println(element.getName());
|
||||
Map<String, Object> map = new LinkedHashMap<String, Object>();
|
||||
List<Element> elements = element.elements();
|
||||
|
||||
List<Attribute> listAttr = element.attributes(); // 当前节点的所有属性的list
|
||||
boolean hasAttributes = false;
|
||||
for (Attribute attr : listAttr) {
|
||||
hasAttributes = true;
|
||||
map.put("@" + attr.getName(), attr.getValue());
|
||||
}
|
||||
|
||||
if (elements.size() == 0) {
|
||||
// map.put(element.getName(), element.getText());
|
||||
if (hasAttributes) {
|
||||
map.put("#text", element.getText());
|
||||
} else {
|
||||
map.put(element.getName(), element.getText());
|
||||
}
|
||||
|
||||
if (!element.isRootElement()) {
|
||||
// return element.getText();
|
||||
if (!hasAttributes) {
|
||||
return element.getText();
|
||||
}
|
||||
}
|
||||
} else if (elements.size() == 1) {
|
||||
map.put(elements.get(0).getName(), xmlToMapWithAttr(elements.get(0)));
|
||||
} else if (elements.size() > 1) {
|
||||
// 多个子节点的话就得考虑list的情况了,比如多个子节点有节点名称相同的
|
||||
// 构造一个map用来去重
|
||||
Map<String, Element> tempMap = new LinkedHashMap<String, Element>();
|
||||
for (Element ele : elements) {
|
||||
tempMap.put(ele.getName(), ele);
|
||||
}
|
||||
Set<String> keySet = tempMap.keySet();
|
||||
for (String string : keySet) {
|
||||
Namespace namespace = tempMap.get(string).getNamespace();
|
||||
List<Element> elements2 = element.elements(new org.dom4j.QName(string, namespace));
|
||||
// 如果同名的数目大于1则表示要构建list
|
||||
if (elements2.size() > 1) {
|
||||
List<Object> list = new ArrayList<Object>();
|
||||
for (Element ele : elements2) {
|
||||
list.add(xmlToMapWithAttr(ele));
|
||||
}
|
||||
map.put(string, list);
|
||||
} else {
|
||||
// 同名的数量不大于1则直接递归去
|
||||
map.put(string, xmlToMapWithAttr(elements2.get(0)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
// /**
|
||||
// * xml转map 不带属性
|
||||
// * @param xmlStr
|
||||
// * @param needRootKey 是否需要在返回的map里加根节点键
|
||||
// * @throws DocumentException
|
||||
// */
|
||||
// @SuppressWarnings("unchecked")
|
||||
// public static Map<String, Object> xmlToMap(String xmlStr, boolean needRootKey) {
|
||||
// try {
|
||||
// Document doc = DocumentHelper.parseText(xmlStr);
|
||||
// Element root = doc.getRootElement();
|
||||
// Map<String, Object> map = (Map<String, Object>) xmlToMap(root);
|
||||
// if (root.elements().size() == 0 && root.attributes().size() == 0) {
|
||||
// return map;
|
||||
// }
|
||||
// if (needRootKey) {
|
||||
// //在返回的map里加根节点键(如果需要)
|
||||
// Map<String, Object> rootMap = new HashMap<String, Object>();
|
||||
// rootMap.put(root.getName(), map);
|
||||
// return rootMap;
|
||||
// }
|
||||
// return map;
|
||||
// } catch (DocumentException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * xml转map 带属性
|
||||
// * @param xmlStr
|
||||
// * @param needRootKey 是否需要在返回的map里加根节点键
|
||||
// * @return
|
||||
// * @throws DocumentException
|
||||
// */
|
||||
// @SuppressWarnings("unchecked")
|
||||
// public static Map<String, Object> xmlToMapWithAttr(String xmlStr, boolean needRootKey) {
|
||||
// try {
|
||||
// Document doc = DocumentHelper.parseText(xmlStr);
|
||||
// Element root = doc.getRootElement();
|
||||
// Map<String, Object> map = (Map<String, Object>) xmlToMapWithAttr(root);
|
||||
// if (root.elements().size() == 0 && root.attributes().size() == 0) {
|
||||
// return map; //根节点只有一个文本内容
|
||||
// }
|
||||
// if (needRootKey) {
|
||||
// //在返回的map里加根节点键(如果需要)
|
||||
// Map<String, Object> rootMap = new HashMap<String, Object>();
|
||||
// rootMap.put(root.getName(), map);
|
||||
// return rootMap;
|
||||
// }
|
||||
// return map;
|
||||
// } catch (DocumentException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * xml转map 不带属性
|
||||
// * @param element
|
||||
// * @return
|
||||
// */
|
||||
// private static Object xmlToMap(Element element) {
|
||||
// // System.out.println(element.getName());
|
||||
// Map<String, Object> map = new LinkedHashMap<String, Object>();
|
||||
// List<Element> elements = element.elements();
|
||||
// if (elements.size() == 0) {
|
||||
// map.put(element.getName(), element.getText());
|
||||
// if (!element.isRootElement()) {
|
||||
// return element.getText();
|
||||
// }
|
||||
// } else if (elements.size() == 1) {
|
||||
// map.put(elements.get(0).getName(), xmlToMap(elements.get(0)));
|
||||
// } else if (elements.size() > 1) {
|
||||
// // 多个子节点的话就得考虑list的情况了,比如多个子节点有节点名称相同的
|
||||
// // 构造一个map用来去重
|
||||
// Map<String, Element> tempMap = new LinkedHashMap<String, Element>();
|
||||
// for (Element ele : elements) {
|
||||
// tempMap.put(ele.getName(), ele);
|
||||
// }
|
||||
// Set<String> keySet = tempMap.keySet();
|
||||
// for (String string : keySet) {
|
||||
// Namespace namespace = tempMap.get(string).getNamespace();
|
||||
// List<Element> elements2 = element.elements(new org.dom4j.QName(string, namespace));
|
||||
// // 如果同名的数目大于1则表示要构建list
|
||||
// if (elements2.size() > 1) {
|
||||
// List<Object> list = new ArrayList<Object>();
|
||||
// for (Element ele : elements2) {
|
||||
// list.add(xmlToMap(ele));
|
||||
// }
|
||||
// map.put(string, list);
|
||||
// } else {
|
||||
// // 同名的数量不大于1则直接递归去
|
||||
// map.put(string, xmlToMap(elements2.get(0)));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * xml转map 带属性
|
||||
// * @param element
|
||||
// * @return
|
||||
// */
|
||||
// private static Object xmlToMapWithAttr(Element element) {
|
||||
// // System.out.println(element.getName());
|
||||
// Map<String, Object> map = new LinkedHashMap<String, Object>();
|
||||
// List<Element> elements = element.elements();
|
||||
//
|
||||
// List<Attribute> listAttr = element.attributes(); // 当前节点的所有属性的list
|
||||
// boolean hasAttributes = false;
|
||||
// for (Attribute attr : listAttr) {
|
||||
// hasAttributes = true;
|
||||
// map.put("@" + attr.getName(), attr.getValue());
|
||||
// }
|
||||
//
|
||||
// if (elements.size() == 0) {
|
||||
// // map.put(element.getName(), element.getText());
|
||||
// if (hasAttributes) {
|
||||
// map.put("#text", element.getText());
|
||||
// } else {
|
||||
// map.put(element.getName(), element.getText());
|
||||
// }
|
||||
//
|
||||
// if (!element.isRootElement()) {
|
||||
// // return element.getText();
|
||||
// if (!hasAttributes) {
|
||||
// return element.getText();
|
||||
// }
|
||||
// }
|
||||
// } else if (elements.size() == 1) {
|
||||
// map.put(elements.get(0).getName(), xmlToMapWithAttr(elements.get(0)));
|
||||
// } else if (elements.size() > 1) {
|
||||
// // 多个子节点的话就得考虑list的情况了,比如多个子节点有节点名称相同的
|
||||
// // 构造一个map用来去重
|
||||
// Map<String, Element> tempMap = new LinkedHashMap<String, Element>();
|
||||
// for (Element ele : elements) {
|
||||
// tempMap.put(ele.getName(), ele);
|
||||
// }
|
||||
// Set<String> keySet = tempMap.keySet();
|
||||
// for (String string : keySet) {
|
||||
// Namespace namespace = tempMap.get(string).getNamespace();
|
||||
// List<Element> elements2 = element.elements(new org.dom4j.QName(string, namespace));
|
||||
// // 如果同名的数目大于1则表示要构建list
|
||||
// if (elements2.size() > 1) {
|
||||
// List<Object> list = new ArrayList<Object>();
|
||||
// for (Element ele : elements2) {
|
||||
// list.add(xmlToMapWithAttr(ele));
|
||||
// }
|
||||
// map.put(string, list);
|
||||
// } else {
|
||||
// // 同名的数量不大于1则直接递归去
|
||||
// map.put(string, xmlToMapWithAttr(elements2.get(0)));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return map;
|
||||
// }
|
||||
|
||||
// public static void main(String[] args) throws Exception {
|
||||
//
|
||||
|
||||
@@ -77,4 +77,9 @@ public class EmailUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// EmailUtils.send("jeesite_demo@163.com", "jeesitedemo1234", "smtp.163.com",
|
||||
// "false", "465", "jeesite_demo@163.com", "测试邮件", "测试<b>邮件</b>的内容");
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -296,7 +296,8 @@ public class ReflectUtils {
|
||||
* 改变private/protected的方法为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。
|
||||
*/
|
||||
public static void makeAccessible(Method method) {
|
||||
if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers()))
|
||||
if ((!Modifier.isPublic(method.getModifiers())
|
||||
|| !Modifier.isPublic(method.getDeclaringClass().getModifiers()))
|
||||
&& !method.isAccessible()) {
|
||||
method.setAccessible(true);
|
||||
}
|
||||
@@ -306,8 +307,9 @@ public class ReflectUtils {
|
||||
* 改变private/protected的成员变量为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。
|
||||
*/
|
||||
public static void makeAccessible(Field field) {
|
||||
if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) || Modifier
|
||||
.isFinal(field.getModifiers())) && !field.isAccessible()) {
|
||||
if ((!Modifier.isPublic(field.getModifiers())
|
||||
|| !Modifier.isPublic(field.getDeclaringClass().getModifiers())
|
||||
|| Modifier.isFinal(field.getModifiers())) && !field.isAccessible()) {
|
||||
field.setAccessible(true);
|
||||
}
|
||||
}
|
||||
@@ -333,16 +335,12 @@ public class ReflectUtils {
|
||||
* @return the index generic declaration, or Object.class if cannot be determined
|
||||
*/
|
||||
public static Class getClassGenricType(final Class clazz, final int index) {
|
||||
|
||||
Type genType = clazz.getGenericSuperclass();
|
||||
|
||||
if (!(genType instanceof ParameterizedType)) {
|
||||
logger.debug(clazz.getSimpleName() + "'s superclass not ParameterizedType");
|
||||
return Object.class;
|
||||
}
|
||||
|
||||
Type[] params = ((ParameterizedType) genType).getActualTypeArguments();
|
||||
|
||||
if (index >= params.length || index < 0) {
|
||||
logger.debug("Index: " + index + ", Size of " + clazz.getSimpleName() + "'s Parameterized Type: "
|
||||
+ params.length);
|
||||
@@ -352,7 +350,6 @@ public class ReflectUtils {
|
||||
logger.debug(clazz.getSimpleName() + " not set the actual class on superclass generic parameter");
|
||||
return Object.class;
|
||||
}
|
||||
|
||||
return (Class) params[index];
|
||||
}
|
||||
|
||||
|
||||
@@ -21,22 +21,22 @@
|
||||
<properties>
|
||||
|
||||
<!-- common version setting -->
|
||||
<commons-io.version>2.6</commons-io.version>
|
||||
<commons-io.version>2.7</commons-io.version>
|
||||
<commons-fileupload.version>1.4</commons-fileupload.version>
|
||||
<commons-beanutils.version>1.9.4</commons-beanutils.version>
|
||||
<commons-text.version>1.8</commons-text.version>
|
||||
<ant.version>1.10.7</ant.version>
|
||||
<commons-text.version>1.9</commons-text.version>
|
||||
<!-- <ant.version>1.10.7</ant.version> -->
|
||||
<fst.version>2.57</fst.version>
|
||||
<fastjson.version>1.2.70</fastjson.version>
|
||||
<jackson.version>2.11.0</jackson.version>
|
||||
<dom4j.version>2.1.1</dom4j.version>
|
||||
<jsoup.version>1.12.2</jsoup.version>
|
||||
<fastjson.version>1.2.73</fastjson.version>
|
||||
<jackson.version>2.11.2</jackson.version>
|
||||
<!-- <dom4j.version>2.1.1</dom4j.version> -->
|
||||
<!-- <jsoup.version>1.12.2</jsoup.version> -->
|
||||
<commons-email.version>1.5</commons-email.version>
|
||||
<activation.version>1.1.1</activation.version>
|
||||
<UserAgentUtils.version>1.21</UserAgentUtils.version>
|
||||
<!-- <metadata-extractor.version>2.11.0</metadata-extractor.version> -->
|
||||
<thumbnailator.version>0.4.11</thumbnailator.version>
|
||||
<twelvemonkeys.version>3.5</twelvemonkeys.version>
|
||||
<thumbnailator.version>0.4.12</thumbnailator.version>
|
||||
<twelvemonkeys.version>3.6</twelvemonkeys.version>
|
||||
<blade-patchca.version>1.1.2</blade-patchca.version>
|
||||
<jmimemagic.version>0.1.5</jmimemagic.version>
|
||||
<zxing.version>3.4.0</zxing.version>
|
||||
@@ -47,8 +47,8 @@
|
||||
<!-- framework version setting -->
|
||||
<mybatis.version>3.5.5</mybatis.version>
|
||||
<mybatis-spring.version>2.0.5</mybatis-spring.version>
|
||||
<jsqlparser.version>3.1</jsqlparser.version>
|
||||
<druid.version>1.1.22</druid.version>
|
||||
<jsqlparser.version>3.2</jsqlparser.version>
|
||||
<druid.version>1.1.23</druid.version>
|
||||
<shiro.version>1.6.0</shiro.version>
|
||||
<j2cache.version>2.8.0-release</j2cache.version>
|
||||
<beetl.version>3.1-SNAPSHOT</beetl.version>
|
||||
|
||||
@@ -47,14 +47,14 @@
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 文件管理与共享
|
||||
<!-- 文件管理共享(个人版)
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-module-filemanager</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- 文件在线预览
|
||||
<!-- 文件在线预览(个人版)
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-module-filepreview</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user