学习时长:6h
解决问题:今天完成了mybatis的学习,实现了springboot上的基本后端流程
代码量:300行
下面是CURD的MAPPER
package com.example.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.example.entity.User; import org.apache.ibatis.annotations.*; import java.util.List; @Mapper public interface UserMapper { /* extends BaseMapper<User> */ @Select("select * from user") public List<User> find(); @Select("select * from user where username=#{username}") public List<User> findOne(String username); @Insert("insert into user values(#{username}, #{password})") public int insert(User user); @Delete("delete from user where username=#{username}") public int del(String username); @Update("update user set password=#{password} where username=#{username}") public int update(String password,String username); }
标签:username,String,23,日报,软工,user,import,password,public From: https://www.cnblogs.com/kun1790051360/p/17690884.html