基于ssm jsp二手书交易系统源码和论文

news2025/2/5 23:59:28

 

随着信息技术的快速发展和网络技术的日益完善,人们越来越重视电子商务。校园

二手物品交易系统是校园电子商务的一个典型代表。二手市场从以前的路边旧货市场转

变到网络中,通过二手交易系统实现了二手交易。而校园二手物品交易系统带给学生省

时、省力、省钱的货物交易平台,它使得同学们充分利用信息技术的优势去处理二手物

品,变得更加轻松、快捷、方便,能满足在校师生快速的学习和生活方式。

由于大学的扩招和当今人民生活水平的急剧提高,当代大学生的人数越来越多,规

模越来越大。当人民的生活水平提高之后,难免就会出现很多过剩物品或者丢弃很多使

用过的物品或者商品。如今这样的二手物品品种越来越丰富,可以说是琳琅满目,品种

齐全,应有尽有。在学校,二手物品的主要消费群体是学生和老师。对于学生和老师来

说,所需的主要是商品或者物品,比如说珍贵的书籍,体育设施设备、耗材,电子产品,

学习文具等。对于二手商品的使用不仅节约了消费者的购买成本,还实现了商品的二次

利用,也就是资源的再利用,这正是向我们提倡的低碳生活靠近。

如今,在校园二手交易市场上,与传统的相比,售卖方式更加地多元化,表现形式

更加新颖。比如说,第一种,在学校的宣传栏、广告栏、报刊栏,贴一些售卖物品的小

广告;第二种,通过学校后勤的批准,可以在毕业前的一段时间内,在学校制定的地方

摆放及售卖商品;第三种,就是学校会定期的举办一些购物活动,一些公司的商品会进

入学校售卖,比如移动手机、电脑耗材。这些方式会在一定的程度上满足购买者和消费

者的需求。可是,计划赶不上变化,而且生活节奏的快速变化,对于要毕业的同学来说,

忙于办理各种繁冗的毕业手续或者完成很多所选学分的课程,无闲暇时间去摆设地摊或

者向低年级的师弟师妹们售卖各种商品,毕业之后,往往他们会直接将不要的物品扔掉,

从而这些二手商品就没有得到合理的有效的使用,造成了资源浪费。而且由于大量的遗

弃之物,很有可能造成学校环境的破环,甚至有可能造成大面积的环境污染。对于毕业

生来说,生活物品无法全部带离学校,因缺乏完善的交易体系,很多物品只能被简单地

丢弃;而对新生,常常需要大量购买生活用品。这种重复行为每年都会发生,对资源造

成极大的浪费。因此,急需建立合理有效的校园二手物品循环系统,既满足学生日常对

廉价二手物品的需求,客观上提高学生的生活质量;又可以在毕业时节,高效处理原本

会被丢弃却仍具价值的旧物,减少资源浪费;同时还能在新生人学时将这些旧物出售,

减少重复购买,减少资源无意义消耗。就此,校园二手商品网站迅速出现了,并且很快

引起了同学和老师的关注。另外一方面,互联网络正处于炙热阶段,同学们及其老师的

生活开始越来越依赖计算机,据不完全统计,平均每天人至少在网上冲浪,浏览新闻等,

时间上至少两小时。因此,如果能够把校园二手交易平台移至网络,依靠网络的高效方

便的特点,将会实现更快,更好的回收利用二手物品。同时,充分利用大学生高素质高

素养的特质,能够高效的高效率的促进网站的开发及其实施。当今社会的主流正在从制

造产品转变为提供服务,关注流程的服务设计已经开始 引领设计行业的发展。该选题

旨在创建校园二手物品循环系统,希望寻找一种能够提高学生使用效率、减少负面情绪、

节约时间与物质成本的合理有序的服务。高校每年的新生人学与毕业生离校,必定产生

强制性的物品更新换代。

平台演示视频:

【java毕业设计】基于ssm jsp二手书交易系统

package com.ncu.controller;

import java.io.File;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.hamcrest.core.IsNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.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 org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;

import com.ncu.common.RegularExpressionUtil;
import com.ncu.common.StringUtil;
import com.ncu.pojo.User;
import com.ncu.service.UserService;


@Controller 
@RequestMapping("/user")  
public class UserController {
    @Autowired
	UserService userService;
    //进入登录注册页面
    @RequestMapping("/index")  
    public ModelAndView index()throws Exception{  
        ModelAndView modelAndview=new ModelAndView();
        modelAndview.setViewName("index");
        return modelAndview; 
    }
    
    //登录失败跳转页面
    @RequestMapping("/loginFail")  
    public ModelAndView loginFail()throws Exception{ 
    	ModelAndView modelAndview=new ModelAndView();
    	modelAndview.setViewName("index");
    	modelAndview.addObject("failureInfo","用户名或密码错误!");
    	return modelAndview; 
    }
    //登录
    @RequestMapping("/login")  
    public String login(@RequestParam String user_account,@RequestParam String pwd,HttpServletRequest request)throws Exception{ 

    	User user = userService.loginValidate(user_account, pwd);
    	if(user!=null){
    		request.getSession().setAttribute("user", user);
    		return "redirect:/goods/showMainGoods.action"; 
    	}else{
    		return "redirect:/user/loginFail.action"; 
    	}
    	
    }
    //退出登录
    @RequestMapping("/loginout")  
    public String loginout(HttpServletRequest request)throws Exception{ 
    	//注销session
    	request.getSession().invalidate();
    	System.out.println("退出登录");
    	return "redirect:/user/index.action";
    }
    //注册
    @RequestMapping("/register")  
    @ResponseBody
    public Map<String, String> register(HttpServletRequest request)throws Exception{ 
    	Map<String, String> resMap=new HashMap<String, String>();
    	//注册信息是否合法
    	if(IsIegalToRegisterInfo(request,resMap)){
    		int res=userService.register(request);
    		if(res==1){
    		  resMap.put("res", "success");
    		}else if(res==2){
    		  resMap.put("res", "fail");
    		  resMap.put("failInfo", "学号已被注册");
    		}else if(res==3){
      		  resMap.put("res", "fail");
      		  resMap.put("failInfo", "用户名已被使用");
      		}else if(res==4){
    		  resMap.put("res", "fail");
    		  resMap.put("failInfo", "手机号已被注册 ");
    		}else if(res==5){
    		  resMap.put("res", "fail");
    		  resMap.put("failInfo", "学校不存在此学号");
    		}
    	}else{
    		resMap.put("res", "fail");
    	}
    	return resMap;
    }
   
    
    //完善个人资料-界面
    @RequestMapping("/user")  
    public ModelAndView userInfoView(HttpServletRequest request)throws Exception{ 
    	ModelAndView modelAndview=new ModelAndView();
        modelAndview.setViewName("user");
        return modelAndview; 
    }
    //完善个人资料-修改个人信息功能
    @RequestMapping("/updateUserInfo")  
    @ResponseBody
    public  Map<String, String> updateUserInfo(HttpServletRequest request)throws Exception{ 
    	Map<String, String> resMap=new HashMap<String, String>();
    	if (IsIegalToUpdateUserInfo(request, resMap)) {
    		boolean res =userService.updateUserInfo(request.getParameter("realName"),request.getParameter("sex"),request.getParameter("email"), ((User)request.getSession().getAttribute("user")).getId());
    		if(res){
    			resMap.put("updateRes", "success");	
    			User user=userService.findUserById(getUserID(request));
        		request.getSession().setAttribute("user", user);
    		}else{
    			resMap.put("updateRes", "fail");	
    		}
    	}else{
    		resMap.put("updateRes", "ilegal");	
    	}
    	return resMap;
    }
    //完善个人资料-修改交易信息功能
    @RequestMapping("/updateTradeInfo")  
    @ResponseBody
    public  Map<String, String> updateTradeInfo(HttpServletRequest request)throws Exception{ 
    	Map<String, String> resMap=new HashMap<String, String>();
		if (IsIegalToUpdateTradeInfo(request, resMap)) {
			boolean res = userService.updateTradeInfo(request.getParameter("alipayNumber"), request.getParameter("shippingAddress"),((User) request.getSession().getAttribute("user")).getId());
			if (res) {
				resMap.put("updateRes", "success");
				User user=userService.findUserById(getUserID(request));
	    		request.getSession().setAttribute("user", user);
			} else {
				resMap.put("updateRes", "fail");
			}
		}else{
    		resMap.put("updateRes", "ilegal");	
    	}
    	return resMap;
    }
    //完善个人资料-修改密码功能
    @RequestMapping("/updatePWD")  
    @ResponseBody
    public  Map<String, String> updatePWD(HttpServletRequest request)throws Exception{ 
    	Map<String, String> resMap=new HashMap<String, String>();
    	if (IsIegalToUpdatePWDInfo(request, resMap)) {
    		boolean res = userService.updatePWD(((User)request.getSession().getAttribute("user")).getPwd(),request.getParameter("pwd_old"), request.getParameter("pwd_new"),((User)request.getSession().getAttribute("user")).getId());
    		if(res){
    			resMap.put("updateRes", "success");	
    		}else{
    			resMap.put("updateRes", "fail");	
    		}  
    	}else{
    		resMap.put("updateRes", "ilegal");	
    	}
    	request.getSession().invalidate();
    	System.out.println("退出登录");
    	return resMap;
    }
    @RequestMapping("/updateHeadImg")      
    public ModelAndView updateHeadImg(MultipartFile headImgFile,HttpServletRequest request)throws Exception{
    	ModelAndView modelAndview=new ModelAndView();
        modelAndview.setViewName("user");
        
        HttpSession session = request.getSession();
		User user = (User) session.getAttribute("user");
       // 图片路径
     		String store_path = "/Data/upfilesForBS/user/headImg/";

		//上传图片
		String name = UUID.randomUUID().toString();
		String newFileName = name + ".jpg";
		File newFile = new File(request.getSession().getServletContext().getRealPath("/images"), newFileName);
		newFile.getParentFile().mkdirs();
		headImgFile.transferTo(newFile);

        String img_name = userService.saveHeadImg("../images/"+newFileName,request.getParameter("id"));
        user.setHeadImg(img_name);
        
        return modelAndview; 
    }
    
    private boolean IsIegalToUpdateUserInfo(HttpServletRequest request,Map<String, String> resMap) {
		if(!RegularExpressionUtil.isUserRealName(StringUtil.messyCodetoChineseStr(request.getParameter("sex")))){
			resMap.put("failInfo", "请填写真实姓名");
			return false;
		}
    	if(!RegularExpressionUtil.isUserSex(StringUtil.messyCodetoChineseStr(request.getParameter("sex")))){
			resMap.put("failInfo", "性别为空或不规范");
			return false;
		}
		if(!RegularExpressionUtil.isUserEmail(StringUtil.messyCodetoChineseStr(request.getParameter("email")))){
			resMap.put("failInfo", "电子邮件不规范");
			return false;
		}

		return true;
	}
    private boolean IsIegalToUpdateTradeInfo(HttpServletRequest request,Map<String, String> resMap) {
		if(!RegularExpressionUtil.isUserAlipayNumber(StringUtil.messyCodetoChineseStr(request.getParameter("alipayNumber")))){
			resMap.put("failInfo", "支付宝账户为空或不规范");
			return false;
		}
		if(!RegularExpressionUtil.isUserShippingAddress(StringUtil.messyCodetoChineseStr(request.getParameter("shippingAddress")))){
			resMap.put("failInfo", "收件地址为空或不规范");
			return false;
		}

		return true;
	}
    private boolean IsIegalToUpdatePWDInfo(HttpServletRequest request,Map<String, String> resMap) {
		if(!RegularExpressionUtil.isUserPwd(request.getParameter("pwd_old"))){
			resMap.put("failInfo", "密码应大于6位小于16位字符");
			return false;
		}
		if(!RegularExpressionUtil.isUserPwd(request.getParameter("pwd_new"))){
			resMap.put("failInfo", "密码应大于6位小于16位字符");
			return false;
		}
		return true;
	}
	private boolean IsIegalToRegisterInfo(HttpServletRequest request,Map<String, String> resMap) {
		if(!RegularExpressionUtil.isUserSno(request.getParameter("sno"))){
			resMap.put("failInfo", "学号不规范");
			return false;
		}
		if(!RegularExpressionUtil.isUserAliasName(StringUtil.messyCodetoChineseStr(request.getParameter("aliasname")))){
			resMap.put("failInfo", "用户名不能超过15个字符");
			return false;
		}
		if(!RegularExpressionUtil.isUserPwd(request.getParameter("pwd"))){
			resMap.put("failInfo", "密码应大于6位小于16位字符");
			return false;
		}
		if(!RegularExpressionUtil.isUserMobileNumber(request.getParameter("phone_number"))){
			resMap.put("failInfo", "手机号格式不规范");
			return false;
		}
		return true;
	}
	
	private Integer getUserID(HttpServletRequest request) {
		User user = (User) request.getSession().getAttribute("user");
		if (user != null) {
		   return user.getId();
		}
		return null;
	}	
  
}



 

 

 

 

 

 

 

 

 

package com.ncu.controller;

import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;

import com.ncu.common.FileSaveUtils;
import com.ncu.pojo.Goods;
import com.ncu.pojo.PageBean;
import com.ncu.pojo.User;
import com.ncu.pojo.vo.CategoryVO;
import com.ncu.pojo.vo.GoodsVO;
import com.ncu.pojo.vo.MessageVO;
import com.ncu.pojo.vo.SignVO;
import com.ncu.service.CategoryService;
import com.ncu.service.GoodsService;
import com.ncu.service.MessageService;

@Controller
@RequestMapping("/goods")
public class GoodsController {
	@Autowired
	GoodsService goodsService;
	@Autowired
	MessageService messageService;
	@Autowired
	CategoryService categoryService;

	// 首页展示10条最新发布通过书籍

	@RequestMapping("/showMainGoods")
	public ModelAndView showGoodsByPage(HttpServletRequest request) {

		ModelAndView modelAndView = new ModelAndView();
		modelAndView.setViewName("main");
        Integer temp=null;
		PageBean<Goods> pageBeanForGoods = goodsService.getGoodsByPage(1, temp);
		if(pageBeanForGoods.getList().size()<=10){
			modelAndView.addObject("goodsList", pageBeanForGoods.getList());
			return modelAndView;
		}
		List<Goods> goodsList = pageBeanForGoods.getList().subList(0, 10);

		modelAndView.addObject("goodsList", goodsList);
		return modelAndView;

	}

	// 分页展示书籍
	@RequestMapping("/showGoodsByPage")
	public ModelAndView showGoodsByPage(HttpServletRequest request,
			Integer categoryId) {

		ModelAndView modelAndView = new ModelAndView();
		int currentPage;
		if (request.getParameter("currentPage") != null)
			currentPage = Integer.parseInt(request.getParameter("currentPage"));
		else
			currentPage = 1;

		PageBean<Goods> pageBeanForGoods = goodsService.getGoodsByPage(
				currentPage, categoryId);
		System.out.println(pageBeanForGoods.toString());
		modelAndView.addObject("pageBeanForGoods", pageBeanForGoods);
		modelAndView.setViewName("goods");
		List<CategoryVO> categoryVOs = categoryService
				.findAllCategoryDataWithIntroduce();
		modelAndView.addObject("categoryVOs", categoryVOs);

		return modelAndView;

	}
	// 模糊查询展示书籍
	@RequestMapping("/showLikeGoodsByPage")
	public ModelAndView showLikeGoodsByPage(HttpServletRequest request,String likeStr) {

		ModelAndView modelAndView = new ModelAndView();
		int currentPage;
		if (request.getParameter("currentPage") != null)
			currentPage = Integer.parseInt(request.getParameter("currentPage"));
		else
			currentPage = 1;

		PageBean<Goods> pageBeanForGoods = goodsService.getGoodsByPage(
				currentPage, likeStr);
		System.out.println(pageBeanForGoods.toString());
		modelAndView.addObject("pageBeanForGoods", pageBeanForGoods);
		modelAndView.setViewName("goods");
		List<CategoryVO> categoryVOs = categoryService
				.findAllCategoryDataWithIntroduce();
		modelAndView.addObject("categoryVOs", categoryVOs);

		return modelAndView;

	}
	// 查詢自身收藏书籍
	@RequestMapping("/showCollection")
	public ModelAndView showGoodsForUser(Integer userId) {

		ModelAndView modelAndView = new ModelAndView();

		// 展示用戶收藏书籍
		List<SignVO> signGoodsList = goodsService
				.listGoodsForCollection(userId);
		modelAndView.addObject("signGoodsList", signGoodsList);
		modelAndView.setViewName("userSign");
		return modelAndView;

	}

	// 查詢自身书籍
	@RequestMapping("/showOwnerGoods")
	public ModelAndView showGoodsForUser(Integer userId, Integer auditState) {

		ModelAndView modelAndView = new ModelAndView();
		List<GoodsVO> goodsList = goodsService.listGoodsForUser(userId,
				auditState);
		modelAndView.addObject("ownGoodsList", goodsList);
		modelAndView.addObject("statusType", auditState);
		modelAndView.setViewName("userGoods");
		return modelAndView;

	}

	// 书籍詳細信息
	@RequestMapping("/detailOfGoods")
	public ModelAndView detailOfGoods(Goods goods) {

		ModelAndView modelAndView = new ModelAndView();
		goods = goodsService.getDetailOfGoods(goods.getId());
		modelAndView.addObject("goods", goods);
		String replaceAll = goods.getPicturePath().replace("/", "\\");
		String path = FileSaveUtils.getSavePath() + replaceAll;
		System.out.println(path);
		
		File f = new File(path);
		if (f.exists()) {
			String[] fileNames = f.list(new FilenameFilter() {
				@Override
				public boolean accept(File dir, String name) {
					return !name.startsWith("thumbnail");// 返回缩略图的名字
				}
			});
			modelAndView.addObject("files", fileNames);
		}

		List<MessageVO> messagesVO = messageService.findMessageOfGoods(goods
				.getId());
		modelAndView.addObject("messagesVO", messagesVO);
		modelAndView.setViewName("detailOfGoods");
		return modelAndView;
	}

	
	
	
    //查询此书籍的卖家 评论
    @RequestMapping("/findOtherGoodsByCropId")
    @ResponseBody
    public List<Goods> findOtherGoodsByCropId(Integer cropId,Integer excludeGoodsId) throws Exception {
    	List<Goods> goodsList =null;
    	if(cropId != null){
    		goodsList = goodsService.findOtherGoodsOfUser(cropId, excludeGoodsId);
        }
        return goodsList;
    }
	
	
	@RequestMapping("/addGoodsView")
	public ModelAndView addGoods(Goods goods, HttpServletRequest request) {
		ModelAndView modelAndView = new ModelAndView();
		List<CategoryVO> categories = categoryService
				.findAllCategoryDataWithIntroduce();
		modelAndView.setViewName("userAddGoods");
		modelAndView.addObject("categories", categories);
		return modelAndView;
	}

	// 添加书籍
	@RequestMapping("/saveGoods")
	public String saveGoods(Goods goods, Integer categoryId,
			HttpServletRequest request, @RequestParam MultipartFile pics) throws Exception{


		//上传图片
		String name = UUID.randomUUID().toString();
		String newFileName = name + ".jpg";
		File newFile = new File(request.getSession().getServletContext().getRealPath("/images"), newFileName);
		newFile.getParentFile().mkdirs();
		pics.transferTo(newFile);

//		String path = null;
//
//		try {
//			path = FileSaveUtils.getSavePath();
//			String random = UUID.randomUUID().toString();
//			path = path + getUserID(request) + "\\" + random + "\\";
//			savePics(pics, path);
//			goods.setCoverPic(1 + FileSaveUtils.getSuffixName(pics[0]));
//			goods.setPicturePath(getUserID(request) + "/" + random);
//		} catch (IllegalStateException e) {
//			e.printStackTrace();
//		} catch (IOException e) {
//			e.printStackTrace();
//		}

		goods.setPicturePath("../images/"+newFileName);
		System.out.println(goods.toString() + "categoryId:" + categoryId);
		boolean saveRes = goodsService.saveGoods(goods, getUserID(request),
				categoryId);
		if (!saveRes) {
			/* modelAndView.addObject("failInfo","书籍上架異常!"); */
		}
		return "redirect:/goods/showOwnerGoods.action?auditState=0&userId="
				+ getUserID(request);
	}

	// 修改书籍
	@RequestMapping("/updateGoods")
	public ModelAndView updateGoods(Goods goods) {

		ModelAndView modelAndView = new ModelAndView();

		boolean updateRes = goodsService.updateGoods(goods);
		if (!updateRes) {
			modelAndView.addObject("failInfo", "书籍修改異常!");
		}
		modelAndView.setViewName("user");
		return modelAndView;
	}

	// 删除书籍
	@RequestMapping("/removeGoods")
	@ResponseBody
	public Map<String, String> removeGoods(Goods goods,
			HttpServletRequest request) {
		Map<String, String> resMap = new HashMap<String, String>();
		boolean removeRes = goodsService.removeGoods(goods.getId());
		if (!removeRes) {
			resMap.put("res", "fail");
		}
		resMap.put("res", "success");
		return resMap;
	}

	// 查询此卖家 的其他书籍
	@RequestMapping("/queryOtherGoods")
	@ResponseBody
	public List<Goods> queryOtherGoods(Integer userId, Integer excludeGoodsId)
			throws Exception {
		List<Goods> goodsList = null;
		goodsList = goodsService.findOtherGoodsOfUser(userId, excludeGoodsId);
		return goodsList;
	}

	// 审核书籍(管理员)
	@RequestMapping("/auditGoods")
	public ModelAndView auditGoods(Goods goods) {

		ModelAndView modelAndView = new ModelAndView();

		return modelAndView;
	}

	// 保存图片
	private void savePics(MultipartFile[] pics, String path)
			throws IllegalStateException, IOException {
		int i = 1;
		for (MultipartFile pic : pics) {
			File saveFile = FileSaveUtils.saveFile(pic, path, i + "");
			// 保存缩略图片
			FileSaveUtils.saveThumbnailFile(saveFile, path + "\\thumbnail\\",
					saveFile.getName());
			i++;
		}
	}

	private Integer getUserID(HttpServletRequest request) {
		User user = (User) request.getSession().getAttribute("user");
		if (user != null) {
			return user.getId();
		}
		return null;
	}
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/103061.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

java调用groovy如何避免OOM

首先我们要清楚java执行groovy的逻辑&#xff0c;这里我们采用了GroovyClassLoader的方法&#xff0c;因为它能缓存编译结果&#xff0c;不用每次执行相同的脚本都需要重新编译&#xff0c;提升执行效率 GroovyCodeSource groovyCodeSource new GroovyCodeSource(context.get…

LeetCode HOT 100 —— 437. 路径总和 III

题目 给定一个二叉树的根节点 root &#xff0c;和一个整数 targetSum &#xff0c;求该二叉树里节点值之和等于 targetSum 的 路径 的数目。 路径 不需要从根节点开始&#xff0c;也不需要在叶子节点结束&#xff0c;但是路径方向必须是向下的&#xff08;只能从父节点到子节点…

WebSocket新一代推送技术及Java Web实现

WebSocket简介 很多网站为了实现推送技术&#xff0c;所用的技术都是轮询。轮询是在特定的时间间隔&#xff08;如每1秒&#xff09;&#xff0c;由浏览器对服务器发出HTTP请求&#xff0c;然后由服务器返回最新的数据给客户端的浏览器。这种传统的模式带来很明显的缺点&#…

Visual Studio 控制台程序世界杯足球C语言版

Visual Studio 控制台程序世界杯足球C语言版程序之美前言主体运行效果核心代码逻辑分析结束语程序之美 前言 一年一度的世界杯如期而至&#xff0c;相信很多球迷小伙伴们一定不会错过这个难得的好机会&#xff0c;大饱眼福&#xff0c;美美的看上几场。 说起国际足联世界杯&a…

架构师必读 —— 逻辑模型(9)

逻辑树分析法 整理信息时&#xff0c;釆用逐条列举的方式是比较方便的。逐条列举的优点是可以简练地整理要点&#xff0c;利于缩小论点的范围&#xff0c;也方便项目的分类。但是&#xff0c;逐条列举也有缺点&#xff0c;就是遗漏和重复不太容易被发现&#xff0c;难以判断是否…

健身房训练计划

文章目录参考资料前言新手健身的首要任务训练计划关于组数、次数、重量和组间休息时间周一胸肌和手臂参考资料 男生健身房一周训练计划, 收藏了 最高效的健身房一周训练计划表&#xff0c;附完整动图教学&#xff01; 前言 新手健身的首要任务 1、了解和熟练掌握锻炼身体各…

从源码的角度解析Spirng 的import标签和alias标签的处理

在上一篇博客《源码深度剖析Spring Bean标签的解析及注册》中描述了bean 标签的解析以及注册。 而Spring 的XML 配置文件职工包括import标签、alias标签、bean标签和beans 标签&#xff0c;那么这篇博客就针对剩余的import 标签 、alias标签进行处理。由于beans标签类似于impor…

docker基础

目录常用命令Docker命令镜像命令(image)容器命令(container)容器数据卷命令挂载具名挂载和匿名挂载查看卷信息数据卷权限dockerfile挂载新建dockerfile文件build构建dockerfile的镜像用自定义的镜像启动容器查看主机挂载路径容器共享数据卷多容器创建DockerFile文件创建dockerf…

三大管理法则—鱼缸法则、木桶效应、热炉法则

一、鱼缸法则 鱼缸法则运用到管理中&#xff0c;就是增加工作的透明度。 各项工作有了透明度&#xff0c;领导者的行为就会置于全体下属的监督之下&#xff0c;就会有效地防止领导者滥用权力&#xff0c;从而强化领导者的自我约束机制。 项目管理中&#xff0c;管理者可以使…

AI 编剧大师 #Dramatron

DeepMind 近日发布了一款名为 “Dramatron” 的新 AI 写作模型&#xff0c;用上它人人都可以变身编剧或者作家&#xff0c;只需要给出一句话大纲&#xff0c; Dramatron 就能生成包括标题、角色列表、情节、场景描述和对话的完整电影 or 戏剧脚本&#xff0c;并且连贯性极强。简…

解决安全生产知识题库小程序加载超大数据无法渲染的问题

遇到问题 在搭建安全生产知识竞赛题库小程序的时候&#xff0c;由于题库的题量太大了&#xff0c;一次性加载setData或者多次concat后setData&#xff0c;其实它俩都是一次性setData&#xff0c;这样就会造成加载超大数据无法渲染空白的问题。 安全生产知识竞答 解决微信小程序…

计算机毕设Python+Vue学生日常事务管理系统(程序+LW+部署)

项目运行 环境配置&#xff1a; Jdk1.8 Tomcat7.0 Mysql HBuilderX&#xff08;Webstorm也行&#xff09; Eclispe&#xff08;IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持&#xff09;。 项目技术&#xff1a; SSM mybatis Maven Vue 等等组成&#xff0c;B/S模式 M…

line-height:1的存在意义是什么(v1)

一、line-height:1的存在意义是什么&#xff08;v1&#xff09; 1. 加不加这段代码的区别是什么&#xff1f; 示例代码 <!DOCTYPE html> <html lang"en"> <style>p{line-height:1;} /* 随时注释的line-height:1 */p{margin:0;background-color:…

《罗马革命》豆瓣 9.1 从恺撒大帝到屋大维

《罗马革命》 关于作者 本书的作者罗纳德•塞姆&#xff0c;是英国牛津大学古罗马历史教授&#xff0c;被誉为20世纪西方世界最出色的罗马史学家。 关于本书 本书的作者抛弃了古罗马史家的论述&#xff0c;从政治史研究的角度&#xff0c;观察罗马革命的前因后果&#xff0c…

Java——记录BigDecimal与0比较的一个坑

文章目录前言问题解决问题解决前言 在之前做的一个项目中&#xff0c;为了保证BigDecimal在除数 divide时&#xff0c;如果被除数为0&#xff0c;出现java.lang.ArithmeticException: / by zero 报错问题&#xff0c;写了一个对比。具体代码如下&#xff1a; public static B…

Promise(一) 介绍及基本使用+API

目录 1.Promise 的理解和使用 1.1. Promise 是什么? 1.1.1. 理解 1.2. 为什么要用 Promise? 1.2.1. 指定回调函数的方式更加灵活 1.2.2. 支持链式调用, 可以解决回调地狱问题 1.3 promise初体验 1.4 Promise实践练习——fs读取文件 1.5 Promise实践练习——Ajax请求…

论文精讲 | 一种隐私保护边云协同训练

作者&#xff1a;王森、王鹏、姚信、崔金凯、胡钦涛、陈仁海、张弓 &#xff5c;单位&#xff1a;2012实验室理论部 论文标题 MistNet: Towards Private Neural Network Training with Local Differential Privacy 论文链接 https://github.com/TL-System/plato/blob/main/…

安装MYSQL 社区版 mysql 8.0.30

https://dev.mysql.com/downloads/ 上面地址下载 安装社区版&#xff0c;选择开发者选项 mysql社区版 8.0.30&#xff0c; 直接都下一步&#xff0c;下一步的安装 安装进度一直在显示 安装完成&#xff0c; 下一步 开发者 输入密码&#xff1a; 增加用户 sa 又是一番执行 …

Effective C++(一):让自己习惯C++

个人读书记录&#xff0c;不适用教学内容。 目录 条款01&#xff1a;视C为一个语言联邦 条款02&#xff1a;尽量以const&#xff0c;enum&#xff0c;inline替换#define 条款03&#xff1a;尽可能使用const 所谓的"顶层const"和"底层const" const返回…

微服务框架 SpringCloud微服务架构 微服务面试篇 54 微服务篇 54.7 Sentinel的线程隔离与Hystix的线程隔离有什么差别

微服务框架 【SpringCloudRabbitMQDockerRedis搜索分布式&#xff0c;系统详解springcloud微服务技术栈课程|黑马程序员Java微服务】 微服务面试篇 文章目录微服务框架微服务面试篇54 微服务篇54.7 Sentinel的线程隔离与Hystix的线程隔离有什么差别?54.7.1 Sentinel与Hystix…