已采纳回答 / LmeetR
                                
                                                            spring:  profiles:    active: dev  datasource:    driver-class-name: com.mysql.jdbc.Driver    url: jdbc:mysql://127.0.0.1:3306/test    username: root    password: root  jpa:    hibernate:      ddl-auto: create    show-sql: true    database-platform: org.h...
                            
                        
                        2018-03-08
                
            
                                最赞回答 / Dtic
                                
                                                            转载@未来_0004  的回答自问自答,找到问题所在了,是由于jdk8的原因,有可能和spring boot的版本也关系,两种方式可选 注册,返回类是Optional<Girl>, Optional是jdk8自带的@GetMapping(value = "/girls/{id}")public Optional<Girl> girlFindOne(@PathVariable("id") Integer id) {   //直接用findById查找   //return  girl...
                            
                        
                        2018-03-08
                
            
                                已采纳回答 / 慕虎8159423
                                
                                                             @Entity类上添加 @JsonIgnoreProperties({"hibernateLazyInitializer","handler"})
                            
                        
                        2018-02-07
                
            
                                已采纳回答 / 盛夏Zzz
                                
                                                            在MVC项目中,@Service注解表示该类是业务层,之前的注解是@Component,但是后面为了区别,分出三个注解,分别是@Service,@Controller,@Repository用来表示业务层,控制层和Dao层。
                            
                        
                        2018-01-28
                
             
             
        












