zoukankan      html  css  js  c++  java
  • SpringMVC视图的创建

    数据库中的创建视图就不说了!

    代码中,创建一个实体类,名要和数据库中的视图名一样

    字段也要一样,位置可以不相同

    @Entity
    public class MediaView {
        @Id
        private String strId;
        private Integer intType;
        private String strTitle;
        private Integer intState;
        private Long click;
        private Long vote;
        private Long comment;
        private String memberId;
        private String strNickName;
        private Date dateTime;
    
    //setter getter省略。。。
    }
    
    在查询时,我用hibernate,所以hql就可以写成from MediaView ,和正常查询其它实体一样

  • 相关阅读:
    Redis基础
    MySQL基础
    MySQL基础
    MySQL基础
    MySQL基础
    Hello 博客园
    Linux | 常用命令
    JVM | 性能调优
    JVM | 垃圾回收
    学习笔记 | 分布式技术
  • 原文地址:https://www.cnblogs.com/live365wang/p/2092441.html
Copyright © 2011-2022 走看看