出現情況:
Inferred type 'S' for type parameter 'S' is not within its bound; should extends xxxxxx
出現這種問題的原因:
SpringBoot 版本問題,SpringBoot 2.0后新特性。
解決方法:
1、修改版本,降為SpringBoot 1.5.x;
2、修改代碼:
修改前: return this.userRepository.findOne(id);
修改后: return this.userRepository.findById(id).orElse(null);