• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
lucklu
博客园    首页    新随笔    联系   管理    订阅  订阅
【IDEA填坑】springboot整合ssm框架

遇到俩问题:一个是mybatis生疏  在EmpMapper.xml中定义resultMap

 <resultMap id="EmpWithDept" type="com.lwp.bean.Emp">
        <id column="emp_id" property="empId"></id>
        <result column="emp_name" property="empName"></result>
        <result column="gender" property="gender"></result>
        <result column="email" property="email"></result>
        <result column="d_id" property="did"></result>
        <association property="dept" javaType="com.lwp.bean.Dept">
            <id column="dept_id" property="deptId"></id>
            <result column="dept_name" property="deptName"></result>
        </association>
    </resultMap>

其中column是表的字段   property是实体类 的字段  我给记反了

第二个问题   查出集合放入前端index.html 用thymeleay接受发现

An error happened during template parsing (template: "class path resource [templates/list.html]

经检查发现modelandview传来的是个字符串而不是集合

原:===》mv.addObject("pageInfo","pageInfo");
检查===》mv.addObject("pageInfo",pageInfo);
ok
posted on 2019-03-15 09:43  lucklu  阅读(221)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3