当前位置 : 主页 > 编程语言 > java >

基于Java+Springboot+HTML 社区疫情防控系统设计和实现

来源:互联网 收集:自由互联 发布时间:2023-02-04
目录 ​​主要功能模块设计​​ ​​主要技术:​​ ​​主要功能实现前端:​​ ​​首页:​​ ​​首页-疫情数据:​​ ​​首页-疫苗接种:​​ ​​人员打卡总记录:​​

目录

  • ​​主要功能模块设计​​
  • ​​主要技术:​​
  • ​​主要功能实现前端:​​
  • ​​首页:​​
  • ​​首页-疫情数据:​​
  • ​​首页-疫苗接种:​​
  • ​​人员打卡总记录:​​
  • ​​个人打卡:​​
  • ​​部分关键代码展示:​​
  • ​​配置模块:​​

主要功能模块设计

登录注册、系统首页、疫情信息、个人打卡、人员打卡记录、系统用户管理、疫情人员管

主要技术:

Java、springboot、mybatis、mysql、jquery、layui、JavaScript、html、css、jsp、log4j等一些常见的基本技术。

主要功能实现前端:

运行项目后 输入http://localhost:8002访问系统 页面

首页:

基于Java+Springboot+HTML 社区疫情防控系统设计和实现_java

首页-疫情数据:

基于Java+Springboot+HTML 社区疫情防控系统设计和实现_spring_02

首页-疫苗接种:

基于Java+Springboot+HTML 社区疫情防控系统设计和实现_springboot_03

人员打卡总记录:

基于Java+Springboot+HTML 社区疫情防控系统设计和实现_java项目实战_04

基于Java+Springboot+HTML 社区疫情防控系统设计和实现_java项目实战_05

个人打卡:

基于Java+Springboot+HTML 社区疫情防控系统设计和实现_spring_06

部分关键代码展示:

package com.sanley.coronavirus.controller;import com.github.pagehelper.PageInfo;import com.sanley.coronavirus.entity.Cure;import com.sanley.coronavirus.entity.User;import com.sanley.coronavirus.service.CureService;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.*;import java.util.List;@Controllerpublic class CureController { @Autowired CureService service; //所有治愈者 @RequestMapping(value = "cure/list",method = RequestMethod.GET) public String list(Model model, @RequestParam(name="page",required = true,defaultValue = "1")int page, @RequestParam(name="size",required=true,defaultValue = "25")int size){ List<Cure> cures = service.findAll(page,size); PageInfo<User> pageInfo=new PageInfo(cures); model.addAttribute("pageInfo",pageInfo); return "list"; } //根据id查找治愈者 @RequestMapping(value = "cure/info/{id}",method = RequestMethod.GET) public String info(@PathVariable("id")int id,Model model){ Cure cure = service.get(id); model.addAttribute("cure",cure); return "cureInfo"; } //更新或插入治愈者的现状 @RequestMapping(value = "cure/update",method = RequestMethod.GET) public String update(int baseId,String current){ service.update(baseId,current); System.out.println(baseId+current); return "redirect:/cure/info/"+baseId; } @RequestMapping(value = "cure/listByCureName") public String listByCureName(Model model, @RequestParam(name = "name", required = true) String name) { List<Cure> cures = service.findByName(name); System.out.println(cures); PageInfo<Cure> pageInfo = new PageInfo<>(cures); model.addAttribute("pageInfo", pageInfo); return "list"; }}

配置模块:

server: port: 8002pagehelper: helperDialect: mysql reasonable: true supportMethodsArguments: true params: count=countSqlmybatis: config-location: classpath:mybatis/mybatis.cfg.xml # mybatis配置文件所在路径 type-aliases-package: com.atguigu.springcloud.entities # 所有Entity别名类所在包spring: datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver # mysql驱动包 url: jdbc:mysql://localhost:3308/coronavirus?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # 数据库名称 username: root password: password dbcp2: min-idle: 5 # 数据库连接池的最小维持连接数 initial-size: 5 # 初始化连接数 max-total: 5 # 最大连接数 max-wait-millis: 200 # 等待连接获取的最大超时时间 thymeleaf: cache: false check-template: true check-template-location: true enabled: true encoding: utf-8 mode: HTML5 prefix: classpath:/templates/ suffix: .html mvc: static-path-pattern: /static/**

网友评论