5.1.7 配置Mapper映射文件
在src\main\resources\mapper路径下加入UserMapper.xml配置文件"
@Autowired
private UserMapper userMapper;
@RequestMapping("/queryUser")
@ResponseBody
public List<User> queryUser(){
List<User> users = userMapper.queryUserList();
return users;
}
}
标签:2024.12,知识点,5.1,19,userMapper,Mybatis,mybatis,mapper From: https://www.cnblogs.com/yangsongduo/p/18664942