最近偷点时间更新一下框架,使用SpringBoot2.0 整套一起更新一下,发现些小问题 Spring data jpa getOne 返回的是代理对象,延迟加载的,ResponseBody成Json的时候会有序列化问题,网上的都说加上这个就好了,这样是能返回. @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) 但是经过自定义的,但
Spring核心功能 DI(IOC) 何谓DI(IOC) DI(依赖注入)是spring的核心功能之一. Dependency Injection 和 Inversion of Control 其实就是一个东西的两种不同的说法而已.本质上是一回事.Dependency Injection 是一个程序设计模式和架构模型, 一些时候也称作 Inversion of Control,尽管在技术上来讲,Dependency Injection 是一个 Inversion of Control 的特殊实现
JPA实体关系映射:@ManyToMany多对多关系.@OneToMany@ManyToOne一对多多对一关系和@OneToOne的深度实例解析 今天程序中遇到的错误一 org.hibernate.AnnotationException: Collection has neither generic type or OneToMany.targetEntity() defined: com.hibernate.SubStation.bays 错误解决方法 org.hibernate.Annota
刚开始是这样写的 @Query(value = "SELECT ll.user_id id ,u.catong_img catong_img,ll.locationId location_id,ll.address address,ll.latitude latitude,ll.longitude longitude,ll.update_time update_time,ll.user_id user_id FROM t_user as u left JOIN (SELECT l.id loca