请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

正在回答

插入代码

2回答

和师兄的springboot保持一致,不要自行更换版本

0 回复 有任何疑惑可以回复我~
  • 提问者 qq_慕侠5372612 #1
    我的springboot是idea新建项目后maven自动下载的,没有更换过版本。请问下视频中师兄的springboot是什么版本?我去核对修改下。
    下载的老师的demo中也没有用findOne(),用的findById(),和视频的不一致啊。demo如下:
    /**
     * Created by 廖师兄
     * 2017-05-07 14:37
     */
    @RunWith(SpringRunner.class)
    @SpringBootTest
    public class ProductCategoryRepositoryTest {
    
        @Autowired
        private ProductCategoryRepository repository;
    
        @Test
        public void findOneTest() {
            ProductCategory productCategory = repository.findById(123456).orElse(null);
            System.out.println(productCategory.toString());
        }
    .........
    回复 有任何疑惑可以回复我~ 2020-05-06 16:23:15
  • 廖师兄助理 回复 提问者 qq_慕侠5372612 #2
    https://git.imooc.com/coding-117/coding-117   这是慕课网上git的源码,配置文件在pom文件里面了
    回复 有任何疑惑可以回复我~ 2020-05-07 20:39:45
  • 提问者 qq_慕侠5372612 #3
    非常感谢!没有自行更改版本哦
    回复 有任何疑惑可以回复我~ 2020-06-04 15:35:07
提问者 qq_慕侠5372612 2020-06-04 15:34:15

springboot版本问题,看视频16-2可以明白

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信