我是靠谱客的博主 无私咖啡豆,这篇文章主要介绍JpaRepository Category,Integer 中的Integer,现在分享给大家,希望可以做个参考。

public interface JpaRepository<T, ID extends Serializable>

学习springboot+JPA时发现写DAO层时都会继承JpaRepository里面很多增删改查的方法,但不明白JpaRepository<Category,Integer>中的Integer是怎么来的,查看JpaRepository的源文件后发现它是指ID类型,ID的类型是int,JpaRepository<>里对应就是哪一个实体类跟实体类ID对应的类型

最后

以上就是无私咖啡豆最近收集整理的关于JpaRepository Category,Integer 中的Integer的全部内容,更多相关JpaRepository内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(149)

评论列表共有 0 条评论

立即
投稿
返回
顶部