Basic implementation of Mybatis addition, deletion, query and modification

Realization of adding, deleting, modifying and checking

select

The select tag is one of the most commonly used tags in mybatis

The select statement has many attributes to configure each SQL statement in detail

id

  • unique identifier in the namespace
  • There is a one-to-one correspondence between the method name in the interface and the SQL statement ID in the mapping file

parameterType

  • The parameter type of the incoming SQL statement. [Universal Map, you can try to use it more]

resultType

  • SQL statement return value type. [full class name or alias]

UserMapper.java interface

package com.wu.dao;

import com.wu.pojo.User;

import 

Guess you like

Origin blog.csdn.net/qq_48975137/article/details/128267517