//得到泛型的Class private Class<T> entityClass = (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];
Java获取泛型 Class
原文:https://www.cnblogs.com/sdu-Jumper/p/12031997.html