|
@@ -6,6 +6,7 @@ import java.util.List;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
+import com.google.common.reflect.TypeToken;
|
|
import com.thoughtworks.xstream.XStream;
|
|
import com.thoughtworks.xstream.XStream;
|
|
|
|
|
|
import cn.com.qmth.examcloud.commons.base.exception.StatusException;
|
|
import cn.com.qmth.examcloud.commons.base.exception.StatusException;
|
|
@@ -38,8 +39,9 @@ public class CourseGroupServiceImpl implements CourseGroupService {
|
|
|
|
|
|
String json = redisClient.get(key, String.class);
|
|
String json = redisClient.get(key, String.class);
|
|
if (null != json) {
|
|
if (null != json) {
|
|
- @SuppressWarnings("unchecked")
|
|
|
|
- List<Course> obj = JsonUtil.fromJson(json, List.class);
|
|
|
|
|
|
+ @SuppressWarnings("serial")
|
|
|
|
+ List<Course> obj = JsonUtil.fromJson(json, new TypeToken<List<Course>>() {
|
|
|
|
+ }.getType());
|
|
list = obj;
|
|
list = obj;
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|