先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7
深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年最新网络安全全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上网络安全知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
如果你需要这些资料,可以添加V获取:vip204888 (备注网络安全)
正文
return “index”;
}
@RequestMapping(“/index”)
public String index2(Model model) {
logger.info(“访问index页面”);
return “index”;
}
@RequestMapping(“/login”)
public String login(Model model) {
logger.info(“访问user/login页面”);
return “user/login”;
}
@RequestMapping(“/register”)
public String register(Model model) {
logger.info(“访问user/register页面”);
return “user/register”;
}
@RequestMapping(“/home”)
public String home(Model model) {
logger.info(“访问user/home页面”);
return “user/home”;
}
@RequestMapping(“/setting”)
public String setting(Model model) {
logger.info(“访问user/setting页面”);
return “user/setting”;
}
@RequestMapping(“/user/index”)
public String userIndex(Model model) {
logger.info(“访问user/index”);
return “user/index”;
}
@RequestMapping(“/product/list”)
public String productList(Model model) {
logger.info(“访问product/list页面”);
return “product/list”;
}
@RequestMapping(“/product/add”)
public String productAdd(Model model) {
logger.info(“访问product/add页面”);
return “product/add”;
}
@RequestMapping(“/product/modify”)
public String productModify(Model model) {
logger.info(“访问product/modify页面”);
return “product/modify”;
}
@RequestMapping(“/product/info”)
public String productDelete(Model model) {
logger.info(“访问product/info页面”);
return “product/info”;
}
@RequestMapping(“/qrcode/list”)
public String qrcodeList(Model model) {
logger.info(“访问qrcode/list页面”);
return “qrcode/list”;
}
@RequestMapping(“/qrcode/info”)
public String qrcodeInfo(Model model) {
logger.info(“访问qrcode/info页面”);
return “qrcode/info”;
}
@RequestMapping(“/source/list”)
public String sourceList(Model model) {
logger.info(“访问source/list页面”);
return “source/list”;
}
@RequestMapping(“/source/chart”)
public String sourceChart(Model model) {
logger.info(“访问source/chart页面”);
return “source/chart”;
}
@RequestMapping(“/admin/home”)
public String adminHome(Model model) {
logger.info(“访问admin/home页面”);
return “admin/home”;
}
@RequestMapping(“/admin/login”)
public String adminLogin(Model model) {
logger.info(“访问admin/login页面”);
return “admin/login”;
}
@RequestMapping(“/admin/setting”)
public String adminSetting(Model model) {
logger.info(“访问admin/setting页面”);
return “admin/setting”;
}
@RequestMapping(“/admin/user-list”)
public String adminUserList(Model model) {
logger.info(“访问admin/user-list页面”);
return “admin/user-list”;
}
@RequestMapping(“/admin/addAdmin”)
public String adminAdd(Model model) {
logger.info(“访问admin/addAdmin页面”);
return “admin/addAdmin”;
}
@RequestMapping(“/info/product-info”)
public String infoProductInfo(Model model) {
logger.info(“访问info/product-info页面”);
return “info/product-info”;
}
}
package com.suzhuoke.ncpsy.controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.suzhuoke.ncpsy.dao.SylyMapper;
import com.suzhuoke.ncpsy.model.Ncp;
import com.suzhuoke.ncpsy.model.Syly;
import com.suzhuoke.ncpsy.model.SylyCountNcpGroupByNcpid;
import com.suzhuoke.ncpsy.service.ISylyService;
import com.suzhuoke.ncpsy.util.tool.Tool;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
/**
-
-
前端控制器
-
@author znz
-
@since 2021-02-22
*/
@Controller
@RequestMapping(“/handle”)
public class SylyController {
protected Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private ISylyService sylyService;
@Autowired
private SylyMapper sylyMapper;
private static Tool tool = new Tool();
/**
-
溯源来源计数
-
@param syly
-
@param request
-
@return
*/
@RequestMapping(“/source/count”)
@ResponseBody
public boolean sourceCount(@RequestBody Syly syly, HttpServletRequest request) {
logger.info(“/handle/source/count===> syly={}”, syly);
//查询syly总数,即溯源总数
QueryWrapper countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.eq(“syqyid”, syly.getSyqyid());
int count = sylyService.count(countQueryWrapper) + 1;
//获取当前日期,设置溯源时间
Date now = new Date();
syly.setSysj(now);
//设置溯源id
SimpleDateFormat df = new SimpleDateFormat(“yyyyMMddHHmmss”);
String newNo = df.format(now);
String syid = “syly-” + newNo + “-” + count;
syly.setSyid(syid);
//设置溯源ip
String syip = request.getRemoteAddr();
syly.setSyip(syip);
boolean flag = sylyService.save(syly);
return flag;
}
/**
-
溯源列表
-
@param syly
-
@param page
-
@param limit
-
@return
-
@throws Exception
*/
@RequestMapping(“/source/list”)
@ResponseBody
public Map sourceList(Syly syly, @RequestParam int page, @RequestParam int limit) throws Exception {
logger.info(“/handle/source/list===> syly={}”, syly);
logger.info(“page = {}”, page);
logger.info(“limit = {}”, limit);
QueryWrapper sylyQueryWrapper = new QueryWrapper<>();
//遍历syly对象的属性
Field field[] = syly.getClass().getDeclaredFields();
for(int i = 0; i < field.length; i++) {
//获取属性名
String name = field[i].getName();
//将属性的首字符大写,方便构造get,set方法
String getterName = name.substring(0,1).toUpperCase()+name.substring(1);
//获取属性的类型
String type = field[i].getGenericType().toString();
//根据类型做操作
if (type.equals(“class java.lang.String”)) {
//获得getter方法
Method m = syly.getClass().getMethod(“get” + getterName);
//调用getter方法
String value = (String) m.invoke(syly);
//如果非空,则加入查询条件
if (value != null) {
sylyQueryWrapper.eq(name, value);
}
}
}
List sylyList = sylyService.list(sylyQueryWrapper);
logger.info(“=========={}”, sylyList);
//查询到的总量,返回数据要用
int count = sylyList.size();
//list截取分页的索引
int fromIndex = (page-1)*limit;
int toIndex = page * limit;
//截取分页数据
if(page*limit > count) {
toIndex = count;
}
sylyList = sylyList.subList(fromIndex, toIndex);
Map response = new HashMap();
response.put(“code”, 0);
response.put(“msg”, “”);
response.put(“count”, count);
response.put(“data”, sylyList);
return response;
}
/**
-
获取7天溯源数据
-
@param syly
-
@return
*/
@RequestMapping(“/source/line”)
@ResponseBody
public Map sourceChart(@RequestBody Syly syly) {
logger.info(“/handle/source/line===> syly={}”, syly);
//groud by 溯源时间查询list
QueryWrapper sylyQueryWrapper = new QueryWrapper<>();
//map对象用来储存返回数据
Map map = new HashMap();
//新建sysjList和counts,用于保存时间和访问数
List sysjList = new ArrayList<>();
List countList = new ArrayList<>();
for(int i = 6; i >= 0; i–) {
//获取i天前日期对象
Date date = tool.getDateBefore(new Date(), i);
//溯源时间转字符串
SimpleDateFormat df = new SimpleDateFormat(“yyyy-MM-dd”);
String sysjString = df.format(date);
//查询i天前溯源数量
QueryWrapper countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.eq(“sysj”, sysjString).eq(“syqyid”, syly.getSyqyid());
int count = sylyService.count(countQueryWrapper);
//将结果插入list
countList.add(count);
sysjList.add(sysjString);
}
map.put(“sysjList”, sysjList);
map.put(“counts”,countList);
return map;
}
/**
-
获取溯源农产品分布数据
-
@param syly
-
@return
*/
@RequestMapping(“/source/pie”)
@ResponseBody
public Map sourcePie(@RequestBody Syly syly) {
logger.info(“/handle/source/pie===> syly={}”, syly);
//获取溯源总数
QueryWrapper sylyQueryWrapper = new QueryWrapper<>();
sylyQueryWrapper.eq(“syqyid”, syly.getSyqyid());
int count = sylyService.count(sylyQueryWrapper);
int alreadyGet = 0;
//获取最大溯源量的4个ncp
List dataList = sylyMapper.selectSylyCountNcpGroupByNcpid(syly.getSyqyid());
//新建两个列表对象储存返回数据
List ncpmcList = new ArrayList<>();
List countList = new ArrayList<>();
//插入查询到的数据到list
for(SylyCountNcpGroupByNcpid item : dataList) {
ncpmcList.add(item.getNcpmc());
countList.add(item.getCount());
alreadyGet += item.getCount();
}
ncpmcList.add(“其他”);
countList.add(count-alreadyGet);
Map map = new HashMap();
map.put(“ncpmcList”, ncpmcList);
map.put(“countList”, countList);
return map;
}
/**
-
获取总溯源数
-
@param syly
-
@return
*/
@RequestMapping(“/source/total”)
@ResponseBody
public List sourceTotal(@RequestBody Syly syly) {
logger.info(“/handle/source/total===> syly={}”, syly);
//获取溯源总数
QueryWrapper sylyQueryWrapper = new QueryWrapper<>();
sylyQueryWrapper.eq(“syqyid”, syly.getSyqyid());
int count = sylyService.count(sylyQueryWrapper);
List list = new ArrayList<>();
list.add(count+“”);
return list;
}
/**
-
获取当日溯源数和同比增长比例
-
@param syly
-
@return
*/
@RequestMapping(“/source/today”)
@ResponseBody
public List sourceToday(@RequestBody Syly syly) {
logger.info(“/handle/source/today===> syly={}”, syly);
//获取今天日期
SimpleDateFormat df = new SimpleDateFormat(“yyyy-MM-dd”);
String todayString = df.format(new Date());
//获取昨天日期
SimpleDateFormat df2 = new SimpleDateFormat(“yyyy-MM-dd”);
String yesterdayString = df.format(new Date(new Date().getTime()-86400000L));
//查询今天总数
QueryWrapper todayQueryWrapper = new QueryWrapper<>();
todayQueryWrapper.eq(“syqyid”, syly.getSyqyid()).eq(“sysj”, todayString);
int todayCount = sylyService.count(todayQueryWrapper);
//查询昨天总数
QueryWrapper yesterdayQueryWrapper = new QueryWrapper<>();
yesterdayQueryWrapper.eq(“syqyid”, syly.getSyqyid()).eq(“sysj”, yesterdayString);
int yesterdayCount = sylyService.count(yesterdayQueryWrapper);
//算出同比增长比例
float rise = ((float)todayCount - (float)yesterdayCount) / (float)yesterdayCount * 100;
List list = new ArrayList<>();
list.add(todayCount+“”);
list.add(rise+“%”);
return list;
}
/**
-
获取7天溯源人数和同比增长比例
-
@param syly
-
@return
*/
@RequestMapping(“/source/week”)
@ResponseBody
public List sourceWeek(@RequestBody Syly syly) {
logger.info(“/handle/source/week===> syly={}”, syly);
//获取今天和七天前的日期
SimpleDateFormat df = new SimpleDateFormat(“yyyy-MM-dd”);
String dateString = df.format(new Date());
String weekBeforeString = df.format(tool.getDateBefore(new Date(), 6));
//查询介于两个日期之间的总数
QueryWrapper countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.between(“sysj”, weekBeforeString, dateString).eq(“syqyid”, syly.getSyqyid());
int count = sylyService.count(countQueryWrapper);
//获取上一期的两个日期
String lastDateString = df.format(tool.getDateBefore(new Date(), 7));
String lastWeekBeforeString = df.format(tool.getDateBefore(new Date(), 13));
//同样查询两个日期之间的总数
QueryWrapper lastCountQueryWrapper = new QueryWrapper<>();
lastCountQueryWrapper.between(“sysj”, lastWeekBeforeString, lastDateString).eq(“syqyid”, syly.getSyqyid());
int lastCount = sylyService.count(lastCountQueryWrapper);
//通过两期数据算出同比增长比例
float rise = ((float)count - (float)lastCount) / (float)lastCount * 100;
//返回数据
List list = new ArrayList<>();
list.add(count+“”);
list.add(rise+“%”);
return list;
}
@RequestMapping(“/source/month”)
@ResponseBody
public List sourceMonth(@RequestBody Syly syly) {
logger.info(“/handle/source/month===> syly={}”, syly);
//获取今天和30天前的日期
SimpleDateFormat df = new SimpleDateFormat(“yyyy-MM-dd”);
String dateString = df.format(new Date());
String monthBeforeString = df.format(tool.getDateBefore(new Date(), 29));
//查询介于两个日期之间的总数
QueryWrapper countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.between(“sysj”, monthBeforeString, dateString).eq(“syqyid”, syly.getSyqyid());
int count = sylyService.count(countQueryWrapper);
//获取上一期的两个日期
String lastDateString = df.format(tool.getDateBefore(new Date(), 30));
String lastMonthBeforeString = df.format(tool.getDateBefore(new Date(), 59));
//同样查询两个日期之间的总数
写在最后
在结束之际,我想重申的是,学习并非如攀登险峻高峰,而是如滴水穿石般的持久累积。尤其当我们步入工作岗位之后,持之以恒的学习变得愈发不易,如同在茫茫大海中独自划舟,稍有松懈便可能被巨浪吞噬。然而,对于我们程序员而言,学习是生存之本,是我们在激烈市场竞争中立于不败之地的关键。一旦停止学习,我们便如同逆水行舟,不进则退,终将被时代的洪流所淘汰。因此,不断汲取新知识,不仅是对自己的提升,更是对自己的一份珍贵投资。让我们不断磨砺自己,与时代共同进步,书写属于我们的辉煌篇章。
需要完整版PDF学习资源私我
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
需要这份系统化的资料的朋友,可以添加V获取:vip204888 (备注网络安全)
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
rapper = new QueryWrapper<>();
countQueryWrapper.between(“sysj”, monthBeforeString, dateString).eq(“syqyid”, syly.getSyqyid());
int count = sylyService.count(countQueryWrapper);
//获取上一期的两个日期
String lastDateString = df.format(tool.getDateBefore(new Date(), 30));
String lastMonthBeforeString = df.format(tool.getDateBefore(new Date(), 59));
//同样查询两个日期之间的总数
写在最后
在结束之际,我想重申的是,学习并非如攀登险峻高峰,而是如滴水穿石般的持久累积。尤其当我们步入工作岗位之后,持之以恒的学习变得愈发不易,如同在茫茫大海中独自划舟,稍有松懈便可能被巨浪吞噬。然而,对于我们程序员而言,学习是生存之本,是我们在激烈市场竞争中立于不败之地的关键。一旦停止学习,我们便如同逆水行舟,不进则退,终将被时代的洪流所淘汰。因此,不断汲取新知识,不仅是对自己的提升,更是对自己的一份珍贵投资。让我们不断磨砺自己,与时代共同进步,书写属于我们的辉煌篇章。
需要完整版PDF学习资源私我
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
需要这份系统化的资料的朋友,可以添加V获取:vip204888 (备注网络安全)
[外链图片转存中…(img-HJaYLQQN-1713219486961)]
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!