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 ,和正常查询其它实体一样

  • 相关阅读:
    C# Dev PropertyGrid
    C# PropertyGrid控件应用心得
    FileWriter不覆盖
    FileWriter
    java试题
    Java线程池
    java自带线程池和队列详细讲解
    HashMap练习题
    Map集合
    java指定
  • 原文地址:https://www.cnblogs.com/live365wang/p/2092441.html
Copyright © 2011-2022 走看看