zoukankan      html  css  js  c++  java
  • Spring MVC框架下 从后台读取数据库并显示在前台页面【笔记自用 不推荐作为参考】

    1.书写jsp页面  people.jsp

       1.设计显示格式以及内容显示

       2.设计显示内容的范围

    2.书写entity实体类 PeopleFormMap.java

       书写传入的参数主要包括 要引用的数据库名 以及主键字段   h_event    id

    3.书写service层

       PeopleService  继承底层的 BaseService

    4.书写service实现类  PeopleServiceImpl

       @peopleservice

    5.书写controller层  PeopleController  Controller实现 界面和service实现类的数据交互

       @RequestMapping(“/people”)

       public class PeopleController extends BaseController{

       private PeopleService peopleservice;

       @ResponseBody

       @RequestMapping("peoplelist")

       public String peoplelist(String txtSelect ) throws Exception{

        return "success";}

    }

    6.书写js页面

      function initPeopleList(){

         var url= rootPath + '/people/findByPage.shtml';

         书写想要显示字段内容

         封装data{

           }

       }

    7.mapping

      书写sql查询语句

       <mapper namespace="RiskForcastMapper">

       <select id="" resultType="java.util.HashMap">

           select * from .....

       </select>

       

       

  • 相关阅读:
    在VC中读写ini配置文件
    fangwen
    背景建模与前景检测
    前景检测算法_3(GMM)
    目标检测中背景建模方法 [转]
    2018目标
    Idhttp Get方法
    二、酷狗 歌词下载
    一、酷狗 歌词搜索 Indy TIdhttp
    酷狗.Krc加密歌词解析
  • 原文地址:https://www.cnblogs.com/teyues/p/7611462.html
Copyright © 2011-2022 走看看