mybatis的注解和xml文件 注解 @Select("select * from student") public List<Student> selAll(); 返回值一定要写明是返回什么类型 xml文件 1.只要在xml文件中设置返回值类型即可 <select id="sel" resultType="Student"> select * from student </select> 2.在接口映射中可以不用在设置返回值类型是什么 public List<Object> sel();