一、可以在SQL中指定类型:
@Insert("insert into student values(#{name,jdbcType=NULL},#{age})")
int addStudent(@Param("name")String name, @Param("age") int age);
二、可以进行全局配置(单独使用MyBatis时可如下配置)
如果不进行配置,将报错
一、可以在SQL中指定类型:
@Insert("insert into student values(#{name,jdbcType=NULL},#{age})")
int addStudent(@Param("name")String name, @Param("age") int age);
二、可以进行全局配置(单独使用MyBatis时可如下配置)
如果不进行配置,将报错
暂无评论
2023-12-22
2023-12-19
2023-12-19
2023-12-19
2023-12-19
2023-12-15
2023-12-15
2023-12-15
2024-05-20
2024-05-20
2024-05-20
2024-05-20
2024-05-20
2024-05-20
2024-05-18
2024-05-18
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17