关于显示分类问题,无法显示出来分类
//显示分类 @Select("select * from category where id = #{id}") @Results(id = "all",value = { @Result(column = "id",property = "id",id = true), @Result(column = "name",property = "name"), @Result(column = "createName",property = "createName"), @Result(column = "createTime",property = "createTime"), @Result(column = "updateTime",property = "updateTime"), @Result(column = "description",property = "description"), }) Category select();
public Category getRoot() { return categoryDao.select(); }
Category root = categoryBiz.getRoot(); request.setAttribute("root",root); request.getRequestDispatcher("/WEB-INF/pages/admin/category_list.jsp").forward(request,response);
请老师帮忙看一下显示分类的逻辑应该怎么写?
1
收起
正在回答 回答被采纳积分+1
1回答
精慕门6573819
2018-12-29 14:17:07
//显示分类 @Select("select * from category where id = #{id}") @Results(id = "all",value = { @Result(column = "id",property = "id",id = true), @Result(column = "name",property = "name"), @Result(column = "createName",property = "createName"), @Result(column = "createTime",property = "createTime"), @Result(column = "updateTime",property = "updateTime"), @Result(column = "description",property = "description"), }) List<Category> select();
public List<Category> getRoot() { return categoryDao.select(); }
List<Category> list = categoryBiz.getRoot(); request.setAttribute("list",list); request.getRequestDispatcher("/WEB-INF/pages/admin/category_list.jsp").forward(request,response);
根据案例更新了一下代码还是不显示
Java数据库开发与实战应用2018版
- 参与学习 人
- 提交作业 277 份
- 解答问题 4297 个
Java数据库开发的必备技能,从流行的MySQL数据库开始,到Java原生的数据库管理接口JDBC的使用,再到常用的数据持久化框架MyBatis,让你向Java工程师的目标又迈进了一步!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星