首页 > 其他 > 详细

Inferred type 'S' for type parameter 'S' is not within its bound;

时间:2019-05-12 11:32:44      阅读:1069      评论:0      收藏:0      [点我收藏+]

错误:

在使用springboot 方法报错:

 Inferred type ‘S‘ for type parameter ‘S‘ is not within its bound; should extend ‘com.atguigu.springboot06.entiy.User

 

解决方法:

1、springboot 版本问题,将 2.0.1 版本换成 1.5.4 版本。

2、将userRepository.findOne(id); ——》改为 userRepository.findById(id).orElse(null);

                  ——》或userRepository.findById(id).get();

 

如图所示:

错误的:

技术分享图片

正确的:

技术分享图片

 

Inferred type 'S' for type parameter 'S' is not within its bound;

原文:https://www.cnblogs.com/zly123/p/10851385.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!