![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
我要过高级
这个作者很懒,什么都没留下…
展开
-
使用mybatis-plus实现数据库的更新操作
以Student的实体类为例子。Student:public class Student implements Serializable { @TableId(value = "student_id") private Integer studentId; @TableField("student_name") private String studentName; @TableField("student_age") private Integer studentAge;原创 2021-11-19 16:13:16 · 3110 阅读 · 0 评论 -
mybatis-plus的删除操作
1.通过Id值进行删除1.1 单个Id值删除sql语句为:delete from 表名 where id=1使用mybatis-plus进行实现:service.removeById(1);也可以这么写:QueryWrapper<实体类名> wrapper = new QueryWrapper<>();wrapper.eq("id",1);service.remove(wrapper);1.2 多个Id值进行删除List<Integer> id原创 2021-11-12 16:04:23 · 28929 阅读 · 2 评论 -
mybatis-plus的查找操作的实现
1.查找操作实现:1.1 无条件的查找List<Student> list = studentService.list();1.21.2.1根据多个Id查询List<Integer> ids = Arrays.asList(202101,202102);List<Student> list = studentService.listByIds(ids);1.2.2单个id:studentService.getById(202101)1.3 根据原创 2021-11-10 23:09:20 · 1398 阅读 · 0 评论 -
spring中的Model在展示界面取不到值得解决方法
@RequestMapping("/testString") public String testString(Model model){ Stinfo stinfo = new Stinfo(); Date date =new Date(System.currentTimeMillis()); stinfo.setAihao("打篮球"); stinfo.setBanji("软件技术一班"); stinfo.setDa原创 2020-05-14 20:19:42 · 433 阅读 · 0 评论 -
SpringMvc配置解决中文乱码的过滤器
在web,xml文件中加入:<filter> <filter-name>characterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> ...原创 2020-04-12 12:37:00 · 350 阅读 · 0 评论