我用的idea,如果出现Field XXX required a bean of type XXX that could not be found.启动失败的话,需要加个@Service注解
2018-06-08
说错了是查询一个女生
@GetMapping(value = "/girls/{id}")
public Optional<Girl> girlFindOne(@PathVariable("id") Integer id){
return girlRepository.findById(id);
}
@GetMapping(value = "/girls/{id}")
public Optional<Girl> girlFindOne(@PathVariable("id") Integer id){
return girlRepository.findById(id);
}
2018-06-04