错误:The type List is not generic; it cannot be parameterized with arguments <Activity>

代码如下:

public List<Activity> getAllActivity() {
        return (List<Activity>) getSqlMapClientTemplate().queryForList("Activity.getAllActivity");
    }

原因:import java.awt.List;不支持泛型。修改引用uitl包,import java.util.List;

java.awt.List是类,java.util.List是一个接口。

The type List is not generic(转载)的更多相关文章

  1. C# Generic(转载)

    型(generic)是C#语言2.0和通用语言运行时(CLR)的一个新特性.泛型为.NET框架引入了类型参数(type parameters)的概念.类型参数使得设计类和方法时,不必确定一个或多个具体 ...

  2. 关于 Angular引用Material出现node_modules/@angular/material/button-toggle/typings/button-toggle.d.ts(154,104): error TS2315: Type 'ElementRef' is not generic.问题

    百度了好久 ,,,最后谷歌出来了.. 该错误可能来自于您将@ angular / material设置为6.0.0, 但所有其他Angular包都是5.x.您应该始终确保Material主要版本与An ...

  3. (转载)sqlmap用户手册详解

    文章转载自 http://www.vuln.cn/2035 当给sqlmap这么一个url (http://www.target.com/sqlmap/mysql/get_int.php?id=1) ...

  4. Beginning Scala study note(8) Scala Type System

    1. Unified Type System Scala has a unified type system, enclosed by the type Any at the top of the h ...

  5. java泛型问题 关于警告:XX is a raw type

    (本文例子适用于JDK 5.0, 学习请先安装并配置!!!)         我们从一个简单的例子开始:假设我们现在需要一个专用来存储字符串的List,该如何实现?呵呵,这还不简单,且看如下代码:   ...

  6. Java1.5泛型指南中文版(Java1.5 Generic Tutorial)

    Java1.5泛型指南中文版(Java1.5 Generic Tutorial) 英文版pdf下载链接:http://java.sun.com/j2se/1.5/pdf/generics-tutori ...

  7. Asterisk的type类型和身份认证

    Asterisk的type类型和身份认证 转载:http://zeevli.blog.163.com/blog/static/119591610201111745012380/ 在Asterisk中对 ...

  8. Reference Type Casting

    5.5.1. Reference Type Casting Given a compile-time reference type S (source) and a compile-time refe ...

  9. Type.MakeGenericType 方法 (Type[]) 泛型反射

    替代由当前泛型类型定义的类型参数组成的类型数组的元素,并返回表示结果构造类型的 Type 对象. 命名空间:   System程序集:  mscorlib(mscorlib.dll 中) public ...

随机推荐

  1. 【CF679B】Theseus and labyrinth(数学,贪心)

    题意: 给一个m<=10^15,每次都减最接近当前值的立方数 让你找一个不大于m的最大的数并且这个数是减法次数最多的数 思路:见http://blog.csdn.net/miracle_ma/a ...

  2. System and method for cache management

    Aspects of the invention relate to improvements to the Least Recently Used (LRU) cache replacement m ...

  3. How to fix the gray screen bug in VirtualBox

    If you see a gray screen instead of GNOME when entering the system, simply switch to a virtual conso ...

  4. linux 下 异步IO

    方法一:使用fcntl来置O_ASYNC位. 这个方法的效果是,当输入缓存中的输入数据就绪时(输入数据可读),内核向用F_SETOWN来绑定的那个进程发送SIGIO信号.此时程序应该用getchar等 ...

  5. ThinkPHP 条件是一个表里面的两个字段比较

    ThinkPHP 条件是一个表里面的两个字段比较 今天群里有人问,thinkphp框架,条件是一个表里的两个字段,怎么查询. 然后就做了下测试: 比如查询出 手机号就是微信号 的用户: (1)首先,正 ...

  6. JProfile 9.2 linux安装及windows客户端远程监控

    http://blog.csdn.net/fengzhou0920/article/details/52119039 1.       测试环境 服务器:Linux X64;tomcat 7.0;jd ...

  7. Codefroces Gym101572 I.Import Spaghetti-有向图跑最小环输出路径(Floyd)

    暑假学的很多东西,现在都忘了,补这道题还要重新学一下floyd,有点难过,我暑假学的东西呢??? 好了,淡定,开始写题解. 这个题我是真的很难过啊,输入简直是有毒啊(内心已经画圈诅咒出题人无数次了.. ...

  8. 海量端口扫描工具masscan

    海量端口扫描工具masscan   masscan号称是互联网上最快的端口扫描工具,可以6分钟扫描整个互联网,每秒可以发送一百万个数据包.为了提高处理速度,masscan定制了TCP/IP栈,从而不影 ...

  9. 一些yuv视频下载地址

    因为测试需要下载一些yuv视频地址,现存一个可以下载yuv视频的地址以备后用 http://trace.eas.asu.edu/yuv/index.html ftp://ftp.ldv.e-techn ...

  10. Loj #2036. 「SHOI2015」自动刷题机

    link : https://loj.ac/problem/2036 这个显然具有单调性,N小的话更容易A题,不仅因为A一次题减少的代码,并且A题的下限也低. 所以直接上二分就行了,注意上限一定不要设 ...