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. JSTL获取list的大小

    转自:https://blog.csdn.net/buster2014/article/details/45789647 JSTL获取list的大小,jstl获取list 的长度,EL表达式获取lis ...

  2. Introduction to Sound Programming with ALSA

    ALSA stands for the Advanced Linux Sound Architecture. It consists of a set of kernel drivers, an ap ...

  3. CS184.1X 计算机图形学导论(第四讲)

    一.齐次变换 1.平移变换 变换矩阵不能包含X,Y,Z等坐标变量 如果x坐标向右平移了5个单位长度,则x~=x+5.在变换矩阵中表示的时候添加一个w坐标变量.通过加入一个w坐标,可以实现平移变换 1& ...

  4. elasticsearch相关聚合查询示例

    索引(index):logstash-nginx-*,type:nginx_access 请求路径: 1.按照某个字段进行分组统计访问量 { "query": { "bo ...

  5. windows命令行运行mysql

    在cmd中输入时一定要保证英文环境. 1. windows命令行运行mysql: 我是将MYSQL安装在C:\Program Files\MySQL所以 C:\Program Files\MySQL\ ...

  6. elasticsearch failed to load elasticsearch nodes

    转载:https://blog.csdn.net/weixin_44714808/article/details/90049315 elasticsearch 安装在linux时使用springboo ...

  7. CDH6.3 Centos7

    按照官方文档安装即可 CentOS7 上搭建 CDH(6.3.0) 官方文档:https://docs.cloudera.com/documentation/enterprise/6/6.3/topi ...

  8. gensim Load embeddings

    gensim package from gensim.models.keyedvectors import KeyedVectors twitter_embedding_path = 'twitter ...

  9. springBoot03- springboot+jpa+thymeleaf增删改查

    参考http://www.mooooc.com/springboot/2017/09/23/spring-boot-jpa-thymeleaf-curd.html 数据库: CREATE TABLE ...

  10. CNN笔记:通俗理解卷积神经网络

    CNN笔记:通俗理解卷积神经网络 2016年07月02日 22:14:50 v_JULY_v 阅读数 250368更多 分类专栏: 30.Machine L & Deep Learning 机 ...