public void getAge(Integer id) throws Exception {
//Optional<Girl> girl = girlRepository.findById(id);
//Integer age = girl.getAge();
Optional<Girl> optionalGirl = girlRepository.findById(id);
Girl girl = optionalGirl.get();
Integer age = girl.getAge();
//Optional<Girl> girl = girlRepository.findById(id);
//Integer age = girl.getAge();
Optional<Girl> optionalGirl = girlRepository.findById(id);
Girl girl = optionalGirl.get();
Integer age = girl.getAge();
2018-06-04
最赞回答 / 萝卜小木头
https://stackoverflow.com/questions/42182426/spring-boot-repository-field-required-a-bean-named-entitymanagerfactory-that直接看这个解答吧,解决了
2018-06-02
已采纳回答 / 武陵捕鱼人
如果是java 8及以下jdk版本,在maven中添加dom4j的依赖即可,如下:
&t;/dependency& &facgroupId&om4dom4j&art/groupId&t; &rsiartifactId&<dom4j&ion/artifactId&pen &/prversion&a s2.1.0&dk /version&要在m &en中/d...
2018-05-28
最新回答 / 走在网络上的程序猿
看一下这个百度经验就可以了https://jingyan.baidu.com/article/d5c4b52b82845dda560dc582.html
2018-05-18