The type List is not generic

文章出处:https://blog.csdn.net/JeamKing/article/details/5773660

错误: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;

猜你喜欢

转载自blog.csdn.net/rainustop/article/details/81031642