我的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());
}
.........