springboot下使用存储过程也很简单。
1、首先Mysql下建立存储过程
2、并不需要改表,我的意思是不需要再实体类上写@之类的,直接写 nativeQuery = true,不然会报错
@Query(value = "call selectByLike(?1) ", nativeQuery = true)
int selectdByLike(@Param("pname") String pname);
springboot下使用存储过程也很简单。
1、首先Mysql下建立存储过程
2、并不需要改表,我的意思是不需要再实体类上写@之类的,直接写 nativeQuery = true,不然会报错
@Query(value = "call selectByLike(?1) ", nativeQuery = true)
int selectdByLike(@Param("pname") String pname);