1、问题,如下图,使用iviewui中的card导致页面不能出现滚动条(不太会弄,在网上查了一个vue组件vuescroll,因此使用这个做滚动条)

2、安装vuescroll

cnpm install -S vuescroll

https://vuescrolljs.yvescoding.org/zh/guide/getting-started.html#%E5%AE%89%E8%A3%85

3、问题:项目使用的jpa操作数据库,因为postclass和post是多堆多的关系,因此post.java和postclass.java如下,

package com.nxz.blog.entity;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator; import javax.persistence.*;
import java.util.HashSet;
import java.util.Set; @Entity
@Data
public class Post { @Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")
@Column(length = 32)
private String postId; private String postTitle; @Lob
private String postContent; /**
* 摘要,也就是content的前100个字符
*/
private String postRemark; private Long createDate; private Long updateDate; @ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "post_postclass", joinColumns = {@JoinColumn(name = "post_id")}, inverseJoinColumns = {@JoinColumn(name = "post_class_id")})
private Set<PostClass> postClasses = new HashSet<>(); }
package com.nxz.blog.entity;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator; import javax.persistence.*;
import java.util.HashSet;
import java.util.Set; @Entity
@Data
public class PostClass { @Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")
@Column(length = 32)
private String classId; @Column(unique = true,length = 50)
private String className; @ManyToMany(mappedBy = "postClasses", fetch = FetchType.LAZY)
private Set<Post> posts = new HashSet<>(); }

但是当调用post.getPostclasses时会出错,会循环输出一下内容:

HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@15e337b2<rs=com.alibaba.druid.pool.DruidPooledResultSet@4ee3a800>
2019-06-11 21:30:16.860 WARN 33728 --- [nio-8888-exec-1] o.h.e.loading.internal.LoadContexts : HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@6fcf2b5b<rs=com.alibaba.druid.pool.DruidPooledResultSet@2547c902>
2019-06-11 21:30:16.860 WARN 33728 --- [nio-8888-exec-1] o.h.e.loading.internal.LoadContexts : HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@2a4c60ce<rs=com.alibaba.druid.pool.DruidPooledResultSet@21504902>
2019-06-11 21:30:16.860 WARN 33728 --- [nio-8888-exec-1] o.h.e.loading.internal.LoadContexts : HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@7b7ad7b1<rs=com.alibaba.druid.pool.DruidPooledResultSet@6f290408>
2019-06-11 21:30:16.860 WARN 33728 --- [nio-8888-exec-1] o.h.e.loading.internal.LoadContexts : H

经过查询资料:https://stackoverflow.com/questions/54946083/jpa-bidirectional-mapping-not-fetching-deep-mapped-data

得知,这个应该是lombok注解@Data导致的,具体原因没有查明,把这个注解去掉,同时自己手写get、set方法和tostring方法,就可以了

vue - blog开发学习6的更多相关文章

  1. vue - blog开发学习5

    基本功能和后台联调 1.首页的所有博客 因为是前后台都是本地开发,所以前端vue需要设置proxy:修改/config/index.js中的这个proxyTable proxyTable: { '/a ...

  2. vue - blog开发学习2

    首页博客列表的开发 1.修改index.vue,使能够支持列表功能 <template> <div> <PostList v-for="(item,index) ...

  3. vue - blog开发学习1

    1.安装vue-cli vue intall -g vue-cli 2.创建项目 vue init webpack nblog 3.按提示要求配置项目 ? Project name nblog ? P ...

  4. vue - blog开发学习4

    1.新建页面的修改,集成富文本编辑 edit-post.vue(新建和修改都用该组件) <template> <div class="editor"> &l ...

  5. vue - blog开发学习3

    1.添加less 和less-loader支持 npm install less less-loader --save-dev 2.新建main.less,将这个样式添加到home.vue中的cont ...

  6. vue - blog开发学7

    将基本的项目部署到linux上(前后台只是实现了基本的功能,本次只是记录一些基本的开发流程,完善,等后续) 1.linux环境准备(我用的是阿里云服务器) ①jre.mysql,Nginx基本上这些就 ...

  7. Vue学习笔记-Vue.js-2.X 学习(二)===>组件化开发

    ===重点重点开始 ========================== (三) 组件化开发 1.创建组件构造器: Vue.extends() 2.注册组件: Vue.component() 3.使用 ...

  8. 前端开发 Vue -1windows环境搭建Vue Node开发环境

    解决几个疑问: 想学习下vue.js,我理解的它是一个前端的框架,主要作用是对数据的处理,和juqery类似,所以不太理解为什么要在nodejs中npm install vue呢?在html文件中引入 ...

  9. Android开发学习路线图

    Android开发学习方法: Android是一个比较庞大的体系,从底层的Linux内核到上层的应用层,各部分的内容跨度也比较大.因此,一个好的学习方法对我们学习Android开发很重要. 在此建议, ...

随机推荐

  1. linux性能分析工具free

  2. smbrun - smbd和外部程序间的接口程序。

    总览 SYNOPSIS smbrun shell-command 描述 DESCRIPTION 此程序是samba套件的一部分. smbrun是个非常小的“粘合”程序,用于为smbd守护程序smbd( ...

  3. 64-基于TMS320C6455、XC5VSX95T 的6U CPCI无线通信处理平台

    基于TMS320C6455.XC5VSX95T 的6U CPCI无线通信处理平台   1. 板卡概述 本板卡由我公司自主研发,基于CPCI架构,符合PICMG2.0 D3.0标准,包含双TI TMS3 ...

  4. iView的Message提示框

    全局配置message main.js Vue.prototype.$Message.config({ top: 70, duration:3 }); Vue.prototype.$Message.c ...

  5. bzoj2004 [Hnoi2010]Bus 公交线路 矩阵快速幂+状压DP

    题目传送门 https://lydsy.com/JudgeOnline/problem.php?id=2004 题解 如果 \(N\) 没有那么大,考虑把每一位分配给每一辆车. 假设已经分配到了第 \ ...

  6. Codefroces 958C2 - Encryption (medium) 区间dp

    转自:https://www.cnblogs.com/widsom/p/8857777.html     略有修改 题目大意: n个数,划分为k段,每一段的和mod p,求出每一段的并相加,求最大是多 ...

  7. Java二级练习试题一

    为保护本地主机,对Applet安全限制中正确的是() A. Applet可加载本地库或方法 B. Applet可读.写本地计算机的文件系统 C. Applet可向Applet之外的任何主机建立网络连接 ...

  8. excel VBA 编程

    Dim cuttent_columns As Integer Dim care_repeat As Integer Private Sub Workbook_Open() Dim i As Integ ...

  9. Delphi 安装Cnpack cnvcl后界面不断弹出 Memory Manager's list capablity overflow ,please enlarge it!

    Delphi 安装Cnpack cnvcl后界面不断弹出 Memory Manager's list capablity overflow ,please enlarge it! 解决方法:删除指定  ...

  10. JS中的作用域及闭包

    1.JS中的作用域 在 es6 出现之前JS中只有全局作用域和函数作用域,没有块级作用域,即 JS 在函数体内有自己的作用域,但是如果不是在函数体的话就全部都是全局作用域.比如在 if.for 等有 ...