/** * 得到实体对应的表名.Annotation方式 * @param c * @return */ public static String getTableName(Class c) { Table annotation = (Table) c.getAnnotation(Table.class); String tableName=""; if(annotation==null) { tableName=c.getSimpleName(); }else { tableName=annotation.name(); } return tableName; }