自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 SpringBoot整合JPA

第一步 在创建项目时,用idea自动导包第二步 写entity@Data@NoArgsConstructor@AllArgsConstructor//标识对应的数据库名称@Table(name = "td_student")//代表此类为实体类@Entitypublic class Student { //表示id为主键 @Id Integer id; String name; Integer age;}第三步 写dao...

2021-09-24 17:51:31 97

原创 在mybatisplus里添加事务

第一步 在配置类里面添加注释@EnableAspectJAutoProxy@EnableTransactionManagement第二步 在mapper层里面编写自己的方法@Delete("delete from td_student where id = #{id}") public int delete(Integer iid);@Delete("delete from td_student1 where age = #{age}") public int dele.

2021-09-24 17:32:56 3275

原创 mybatisplus进行自己添加条件查询

第一步 在service里面使用QueryWrapperpublic List<Student> selectStudentByAge(Integer age1){ QueryWrapper<Student> wrapper = new QueryWrapper<>(); //le:小于age1的age字段 wrapper.le("age",age1); return studentMapper.se.

2021-09-24 16:21:11 1862

原创 mybatisplus增加查询条件

第一步 在mapper层里写按条件查询方法@Mapperpublic interface StudentMapper extends BaseMapper<Student> { //插入按名字查询 @Select("select * from td_student where name = #{name}") public List<Student> selectStudentByname(String name);}第二步 在service..

2021-09-24 15:35:09 1995

原创 Mybatisplus设置分页

1、第一步 设置拦截器 @Configurationpublic class Config { @Bean public MybatisPlusInterceptor mybatisPlusInterceptor(){ //设置总拦截器 MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor(); //将分页插件加入拦截器中 ...

2021-09-24 15:27:02 358

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除