主键冲突异常 DuplicateKeyException
2019-07-26 本文已影响0人
DataSource
import org.springframework.dao.DuplicateKeyException;
try{
someMapper.insert(someBean);
//TODO something
}catch(DuplicateKeyException e){
//TODO something else
}
import org.springframework.dao.DuplicateKeyException;
try{
someMapper.insert(someBean);
//TODO something
}catch(DuplicateKeyException e){
//TODO something else
}