<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.1</version>
</dependency>
mybatis:
type-aliases-package: cn.boku.pojo
mapper-locations: classpath:mybatis/mapper/*.xml
package cn.boxku.mapper;
import cn.boxku.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
@Repository
public interface UserMapper {
List<User> queryUserList();
User selectUserById(int id);
int addUser(User user);
int updateUser(int id);
int deleteUser(int id);
}
本作品採用《CC 協議》,轉載必須註明作者和本文連結