毕设基于SSM+Vue3实现设备维修管理系统四:后台框架及基础增删改查功能实现

news2024/9/24 22:26:59

  本章介绍后端基础框架及基础的增删改查功能实现,创建基础的dao、service即controller层相关的基类,并实现基础的增删改查相关功能。

源码下载:点击下载
讲解视频:

SMM+VUE3实现设备维修管理系统毕设:后端框架搭建及表外键添加

在这里插入图片描述

一、基础框架搭建

1.1 DAO层

  使用mybatisplus提供的BaseMapper,实现基础的数据库增删改查功能。

package com.junjunjun.device.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.junjunjun.device.entity.BaseEntity;

/**
 * 数据层处理的基础类
 */
public interface BaseDao<T extends BaseEntity> extends BaseMapper<T> {

}

1.2 SERVICE层

  service层实现业务逻辑,包括数据填充、数据缓存、事务、关联数据处理等基础逻辑。

package com.junjunjun.device.service;

import com.junjunjun.device.entity.BaseEntity;

/**
 * 业务逻辑基础
 * @param <T>
 */
public interface IBaseService<T extends BaseEntity> {

}

  实现数据删除基础服务,为需要删除数据的实体提供对应的数据删除业务逻辑。

package com.junjunjun.device.service;

import com.junjunjun.device.entity.BaseDataEntity;
/**
 * 删除数据
 * @param <T>
 */
public interface IBaseDeleteService<T extends BaseDataEntity> extends IBaseService<T>{
	/**
	 * 删除数据
	 * @param id
	 */
	void delete(Long id);
}

  数据保存基础处理逻辑。

package com.junjunjun.device.service;

import com.junjunjun.device.entity.BaseDataEntity;
import com.junjunjun.device.vo.BaseDataVo;

/**
 * 数据保存
 * 
 * @param <T>
 */
public interface IBaseSaveService<V extends BaseDataVo,T extends BaseDataEntity> extends IBaseService<T> {
	/**
	 * 保存数据
	 * 
	 * @param data
	 */
	V save(V data);
}

  数据更新基础处理逻辑。

package com.junjunjun.device.service;

import com.junjunjun.device.entity.BaseDataEntity;
import com.junjunjun.device.vo.BaseDataVo;

/**
 * 更新数据
 * 
 * @param <T>
 */
public interface IBaseUpdateService<V extends BaseDataVo,T extends BaseDataEntity> extends IBaseService<T> {
	/**
	 * 更新数据
	 * 
	 * @param data
	 */
	V update(V data);
}

  数据查询相关基础处理逻辑,包括详情、分页等查询功能。

package com.junjunjun.device.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.junjunjun.device.entity.BaseDataEntity;
import com.junjunjun.device.vo.BaseDataVo;

/**
 * 查詢數據
 * 
 * @param <T>
 */
public interface IBaseViewService<V extends BaseDataVo, T extends BaseDataEntity> extends IBaseService<T> {
	/**
	 * 获取详情
	 * 
	 * @param id
	 * @return
	 */
	V get(Long id);

	/**
	 * 分页
	 * 
	 * @param size
	 * @param pageNo
	 * @param dict
	 * @return
	 */
	Page<V> page(Page<V> page, V data);
}

  service服务实现基类。

package com.junjunjun.device.service.impl;

import org.springframework.security.core.GrantedAuthority;

import com.junjunjun.device.entity.BaseEntity;
import com.junjunjun.device.entity.system.User;
import com.junjunjun.device.service.IBaseService;

import lombok.extern.slf4j.Slf4j;

/**
 * 业务逻辑基础类
 * 
 * @param <T>
 */
@Slf4j
public abstract class BaseServiceImpl<T extends BaseEntity> implements IBaseService<T> {
	/**
	 * 判断当前登录用户是否是管理员
	 * 
	 * @param user
	 * @return
	 */
	protected boolean currentUserIsAdmin(User user) {
		if (user == null) {
			return false;
		}
		for (GrantedAuthority item : user.getAuthorities()) {
			if ("ROLE_ADMIN".equals(item.getAuthority())) {
				return true;
			}
		}
		return false;
	}

	/**
	 * 判断当前登录用户是否是部門管理员
	 * 
	 * @param user
	 * @return
	 */
	protected boolean currentUserIsDepartmentAdmin(User user) {
		if (user == null) {
			return false;
		}
		for (GrantedAuthority item : user.getAuthorities()) {
			if ("ROLE_DEPARTMENT_ADMIN".equals(item.getAuthority())) {
				return true;
			}
		}
		return false;
	}

	/**
	 * 判断当前登录用户是否具有审核权限
	 * 
	 * @param user
	 * @return
	 */
	protected boolean currentUserIsExamineAdmin(User user) {
		if (user == null) {
			return false;
		}
		for (GrantedAuthority item : user.getAuthorities()) {
			if ("ROLE_EXAMINE_ADMIN".equals(item.getAuthority())) {
				return true;
			}
		}
		return false;
	}
	
	/**
	 * 判断当前登录用户是否具有审核权限
	 * 
	 * @param user
	 * @return
	 */
	protected boolean currentUserIsCheckAdmin(User user) {
		if (user == null) {
			return false;
		}
		for (GrantedAuthority item : user.getAuthorities()) {
			if ("ROLE_CHECK_ADMIN".equals(item.getAuthority())) {
				return true;
			}
		}
		return false;
	}
}

  数据删除基础服务。

package com.junjunjun.device.service.impl;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.transaction.annotation.Transactional;

import com.junjunjun.device.CacheRemove;
import com.junjunjun.device.SaveLog;
import com.junjunjun.device.entity.BaseDataEntity;
import com.junjunjun.device.service.IBaseDeleteService;
import com.junjunjun.device.vo.BaseDataVo;

/**
 * 刪除功能
 * 
 * @param <T>
 */
public abstract class BaseDeleteServiceImpl<V extends BaseDataVo, T extends BaseDataEntity>
		extends BaseUpdateServiceImpl<V, T> implements IBaseDeleteService<T> {
	@Override
	@SaveLog(operDesc = "刪除数据信息", operType = "刪除")
	@CacheEvict(cacheNames = "systemcache", key = "#root.targetClass+'_get_'+#id")
	@CacheRemove(value =  {"#root.targetClass+'_page_'"},cache = "systemcache")
	@Transactional(rollbackFor = Exception.class)
	public void delete(Long id) {
		getDao().deleteById(id);
		afterDelete(id);
	}

	protected void afterDelete(Long id) {

	}
}

  数据保存基础服务。

package com.junjunjun.device.service.impl;

import org.springframework.cache.annotation.CachePut;
import org.springframework.transaction.annotation.Transactional;

import com.junjunjun.device.CacheRemove;
import com.junjunjun.device.SaveLog;
import com.junjunjun.device.entity.BaseDataEntity;
import com.junjunjun.device.service.IBaseSaveService;
import com.junjunjun.device.vo.BaseDataVo;

/**
 * 保存數據
 */
public abstract class BaseSaveServiceImpl<V extends BaseDataVo, T extends BaseDataEntity>
		extends BaseViewServiceImpl<V, T> implements IBaseSaveService<V, T> {

	@Override
	@SaveLog(operDesc = "添加数据信息", operType = "添加")
	@CachePut(cacheNames = "systemcache", key = "#root.targetClass+'_get_'+#result.id")
	@CacheRemove(value =  {"#root.targetClass+'_page_'"},cache = "systemcache")
	@Transactional(rollbackFor = Exception.class)
	public V save(V data) {
		/**
		 * 1.默认数据的填充
		 * 
		 * 2.记录操作日志
		 * 
		 * 3.缓存数据的更新
		 */
		T e = getDto().voToEntity(data);
		getDao().insert(e);
		V result = getDto().entityToVo(e);
		afterSave(result,data);
		return result;
	}

	protected void afterSave(V result,V data) {
	}
}

  数据更新基础服务。

package com.junjunjun.device.service.impl;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.junjunjun.device.CacheRemove;
import com.junjunjun.device.SaveLog;
import com.junjunjun.device.entity.BaseDataEntity;
import com.junjunjun.device.service.IBaseUpdateService;
import com.junjunjun.device.vo.BaseDataVo;

/**
 * 添加/更新/查看功能
 * 
 * @param <T>
 */
public abstract class BaseUpdateServiceImpl<V extends BaseDataVo, T extends BaseDataEntity>
		extends BaseSaveServiceImpl<V, T> implements IBaseUpdateService<V, T> {

	/**
	 * 填充要更新的字段
	 * 
	 * @param data
	 * @param updateWrapper
	 */
	protected abstract void initUpdateWrapper(V data, UpdateWrapper<T> updateWrapper);

	@Override
	@SaveLog(operDesc = "更新数据信息", operType = "更新")
	@CacheRemove(value =  {"#root.targetClass+'_page_'"},cache = "systemcache")
	@CachePut(cacheNames = "systemcache", key = "#root.targetClass+'_get_'+#result.id")
	@Transactional(rollbackFor = Exception.class)
	public V update(V data) {
		UpdateWrapper<T> updateWrapper = new UpdateWrapper<T>();
		initUpdateWrapper(data, updateWrapper);
		updateWrapper.eq("id", data.getId());
		getDao().update(updateWrapper);
		afterUpdate(data);

		return get(data.getId());
	}

	protected void afterUpdate(V data) {

	}
}

  数据查询相关业务基础服务。

package com.junjunjun.device.service.impl;

import java.util.List;

import org.springframework.cache.annotation.Cacheable;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.junjunjun.device.dao.BaseDao;
import com.junjunjun.device.dto.BaseDto;
import com.junjunjun.device.entity.BaseDataEntity;
import com.junjunjun.device.service.IBaseViewService;
import com.junjunjun.device.vo.BaseDataVo;

/**
 * 查看功能接口
 * 
 * @param <T>
 */
public abstract class BaseViewServiceImpl<V extends BaseDataVo, T extends BaseDataEntity> extends BaseServiceImpl<T>
		implements IBaseViewService<V, T> {

	/**
	 * 获取具体的dao
	 * 
	 * @return
	 */
	protected abstract BaseDao<T> getDao();

	/**
	 * 获取具体的dao
	 * 
	 * @return
	 */
	protected abstract BaseDto<V, T> getDto();

	/**
	 * 填充搜索条件
	 * 
	 * @param dict
	 * @param queryWrapper
	 */
	protected abstract void initQueryWrapper(V data, QueryWrapper<T> queryWrapper);

	@Override
	@Cacheable(value = "systemcache", key="#root.targetClass+'_'+#root.method.name+'_'+#id")
	public V get(Long id) {
		T t = getDao().selectById(id);
		if(t==null) {
			return null;
		}
		V v = getDto().entityToVo(t);
		return afterGet(v);
	}

	/**
	 * 注入关联数据
	 * 
	 * @param v
	 * @return
	 */
	protected V afterGet(V v) {
		return v;
	};

	@Override
//	@Cacheable(value = "systemcache", key="#root.targetClass+'_'+#root.method.name+'_'+#page.orders+'_'+#page.current+'_'+#page.size+'_'+#data")
	@Cacheable(value = "systemcache", keyGenerator = "cachekKeyGenerator")
	public Page<V> page(Page<V> page, V data) {
		Page<T> tpage = new Page<>(page.getCurrent(), page.getSize());
		QueryWrapper<T> queryWrapper = new QueryWrapper<T>();
		initQueryWrapper(data, queryWrapper);
		queryWrapper.orderByDesc("create_date");
		tpage = getDao().selectPage(tpage, queryWrapper);

		page.setCountId(tpage.countId());
		page.setCurrent(tpage.getCurrent()).setMaxLimit(tpage.maxLimit());
		page.setOptimizeCountSql(tpage.optimizeCountSql());
		page.setOptimizeJoinOfCountSql(tpage.optimizeJoinOfCountSql());
		page.setOrders(tpage.orders());
		page.setPages(tpage.getPages());
		page.setSize(tpage.getSize());
		List<V> vs = Lists.newArrayList();
		tpage.getRecords().forEach(item -> {
			V v = getDto().entityToVo(item);
			afterGet(v);
			vs.add(v);
		});
		page.setRecords(vs);
		page.setSize(tpage.getSize()).setTotal(tpage.getTotal());
		page.setSearchCount(tpage.searchCount());
		return page;
	}

}

1.3 CONTROLLER层

  controller基础类,所有的controller都继承此类。

package com.junjunjun.device.api;

import lombok.extern.slf4j.Slf4j;

/**
 * 接口的抽象类
 */
@Slf4j
public abstract class BaseController {

}

  数据删除接口基础类。

package com.junjunjun.device.api;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.junjunjun.device.service.IBaseDeleteService;
import com.junjunjun.device.vo.BaseDataVo;
import com.junjunjun.device.vo.ResultVo;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.NotNull;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public abstract class BaseDeleteController<T extends BaseDataVo> extends BaseSaveController<T> {
	@PostMapping("/delete/{id}")
	@ResponseBody
	@PreAuthorize("hasAuthority(#this.this.class.name+':delete')")
	public ResultVo<T> delete(@Validated @NotNull(message = "ID不能为空") @PathVariable Long id, HttpServletRequest request,
			HttpServletResponse response) {
		// TODO 参数及权限校验
		try {
			((IBaseDeleteService<?>) getService()).delete(id);
			return ResultVo.success(null);
		} catch (Exception e) {
			e.printStackTrace();
			log.error("更新异常", e);
			return ResultVo.error(e.getMessage());
		}
	};
}

  数据保存接口基础类。

package com.junjunjun.device.api;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import com.junjunjun.device.Save;
import com.junjunjun.device.service.IBaseSaveService;
import com.junjunjun.device.vo.BaseDataVo;
import com.junjunjun.device.vo.ResultVo;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public abstract class BaseSaveController<T extends BaseDataVo> extends BaseUpdateController<T> {
	@PostMapping("/save")
	@ResponseBody
	@PreAuthorize("hasAuthority(#this.this.class.name+':save')")
	public ResultVo<T> save(@Validated(value = Save.class) @RequestBody T t, HttpServletRequest request,
			HttpServletResponse response) {
		// TODO 参数及权限校验
		try {
			t = ((IBaseSaveService<T, ?>) getService()).save(t);
			return ResultVo.success(t);
		} catch (Exception e) {
			e.printStackTrace();
			log.error("更新异常", e);
			return ResultVo.error(e.getMessage());
		}
	};
}

  数据更新接口基础类。

package com.junjunjun.device.api;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import com.junjunjun.device.Update;
import com.junjunjun.device.service.IBaseUpdateService;
import com.junjunjun.device.vo.BaseDataVo;
import com.junjunjun.device.vo.ResultVo;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public abstract class BaseUpdateController<T extends BaseDataVo> extends BaseViewController<T> {

	@PostMapping("/update")
	@ResponseBody
	@PreAuthorize("hasAuthority(#this.this.class.name+':update')")
	public ResultVo<T> update(@Validated(value = Update.class) @RequestBody T t, HttpServletRequest request,
			HttpServletResponse response) {
		// TODO 参数及权限校验
		try {
			((IBaseUpdateService<T, ?>) getService()).update(t);
			return ResultVo.success(t);
		} catch (Exception e) {
			e.printStackTrace();
			log.error("更新异常", e);
			return ResultVo.error(e.getMessage());
		}
	};
}

  数据查询接口基础类。

package com.junjunjun.device.api;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.junjunjun.device.entity.BaseDataEntity;
import com.junjunjun.device.service.IBaseService;
import com.junjunjun.device.service.IBaseViewService;
import com.junjunjun.device.vo.BaseDataVo;
import com.junjunjun.device.vo.PageVo;
import com.junjunjun.device.vo.ResultVo;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.NotNull;

@RequestMapping(path = "/")
public abstract class BaseViewController<T extends BaseDataVo> extends BaseDataController<T> {

	/**
	 * 获取具体的service服务
	 * 
	 * @return
	 */
	protected abstract <E extends BaseDataEntity> IBaseService<E> getService();

	@GetMapping("/get/{id}")
	@ResponseBody
	@PreAuthorize("hasAuthority(#this.this.class.name+':get')")
	public ResultVo<T> get(@Validated  @NotNull(message = "ID不能为空") @PathVariable Long id, HttpServletRequest request,
			HttpServletResponse response) {
		if (id == null) {
			return ResultVo.error("参数为空");
		}
		// TODO 权限的检测
		T t = ((IBaseViewService<T, ?>) getService()).get(id);

		return ResultVo.success(t);
	};

	@PostMapping("/page")
	@ResponseBody
	@PreAuthorize("hasAuthority(#this.this.class.name+':page')")
	public ResultVo<T> page(@RequestBody PageVo<T> page, HttpServletRequest request, HttpServletResponse response) {
		if (page == null) {
			page = new PageVo<>();
		}
		if (page.getPage() == null) {
			page.setPage(new Page<>(1, 10));
		}
		Page<T> result = ((IBaseViewService<T, ?>) getService()).page(page.getPage(), page.getEntity());
		return ResultVo.success(result);
	};
}

二、增删改查实现

用户 controller service dao 数据库 调用接口,进行参数、权限检测。 调用对应service方法,进行相关业务逻辑处理。 调用dao数据操作。 进行数据库操作。 用户 controller service dao 数据库

2.1 数据添加

  controller接口层通过save方法进行请求,请求后进行参数合法性及权限检测,调用service中的save方法进行数据保存,service层保存数据时自动填充默认数据及相关业务逻辑处理。service处理完毕后调用dao层进行数据库操作,数据库操作完毕后清除相关缓存。

2.2 数据删除

  controller接口层通过delete方法进行请求,请求后进行参数合法性及权限检测,调用service中的delete方法进行数据删除,service层删除数据时自动处理相关业务逻辑。service处理完毕后调用dao层进行数据库操作,数据库操作完毕后清除相关缓存。

2.3 数据修改

  controller接口层通过update方法进行请求,请求后进行参数合法性及权限检测,调用service中的update方法进行数据更新,service层更新数据时自动填充默认数据及相关业务逻辑处理。service处理完毕后调用dao层进行数据库操作。

2.4 分页查询

  controller接口层通过page方法进行请求,请求后进行参数合法性及权限检测,调用service中的page方法进行数据查询,service层调用dao层进行数据库查询数据时自动填充关联数据并进行缓存处理。

2.5 详情查询

  controller接口层通过get方法进行请求,请求后进行参数合法性及权限检测,调用service中的get方法进行数据查询,service层调用dao层进行数据库查询数据时自动填充关联数据并进行缓存处理。

  某些实体只能进行查询,不能进行删除、更新等操作,可以通过只继承Update或VIew相关的基类实现对应功能的控制。

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

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

相关文章

重塑“万免”电商平台的魅力与潜力

今天&#xff0c;我想与大家深入探讨一个近期在电商领域备受瞩目的新概念——“万免”电商平台。我们将一同剖析其独特的运营模式&#xff0c;挖掘它在私域电商领域的非凡魅力与潜在价值。 一、万免模式的创新解读 万免联盟&#xff0c;一个旨在打破传统电商界限的创新平台&am…

内生性检验与过度识别检验

目录 一、文献综述 二、理论原理 三、实证模型 四、程序代码 一、文献综述 内生性问题在经济学和社会科学研究中一直是一个关键挑战&#xff0c;众多学者致力于寻找有效的方法来解决这一问题并确保研究结果的可靠性。 Angrist 和 Krueger&#xff08;1991&#xff09;在研究…

信用卡存量经营读书笔记

信用卡的各项收益和损失分析表 用杜邦分析法拆利润如下 信用卡要不要烧钱&#xff1f;不要&#xff0c;因为没有网络效应&#xff08;用户量增加带来的优惠比较少&#xff09;和赢家通吃的情况 线上获客的几种方式&#xff1a;引流分成、某个项目的联名信用卡、营业收入分成 …

828华为云征文 | 使用Linux管理面板1Panel管理华为云Flexus云服务器X实例

828华为云征文 | 使用Linux管理面板1Panel管理华为云Flexus云服务器X实例 一、华为云Flexus云服务器X实例介绍1.1 Flexus云服务器X实例简介1.2 Flexus云服务器X实例特点 二、1Panel介绍2.1 1Panel 简介2.2 1Panel 特点 三、本次实践介绍3.1 本次实践简介3.2 本次环境规划 四、购…

【machine learning-17-分类(逻辑回归sigmod)】

分类问题 先说一下什么是分类问题&#xff0c;举个例子&#xff1a; 判定一封邮件是否是垃圾邮件&#xff1b; 判定图片是不是一直猫&#xff1b; 等等 这些问题的答案都是有限的&#xff0c;而不像是线性回归&#xff0c;是存在无限可能的不确定值。 这种问题就是分类问题&am…

分区与分桶

分区 分区字段大小写&#xff1a; 在hive中&#xff0c;分区字段名是不区分大小写的&#xff0c;不过字段值是区分大小写的。我们可以来测试一下 导入数据 load data local inpath /home/hivedata/user1.txt into table part4 partition(year2018,month03,DAy21); load data …

Mysql——初识Mysql

目录 数据库基础 创建数据库 服务器&#xff0c;数据库&#xff0c;表关系 数据逻辑存储 MySQL架构 SQL分类 存储引擎 mysql服务端是一个网络服务器&#xff0c;采用的是TCP协议在应用层 &#xff0c;mysql有自己的协议。 数据库基础 mysql不是数据库&#xff0c;是mysql的…

18.1 k8s服务组件之4大黄金指标讲解

本节重点介绍 : 监控4大黄金指标 Latency&#xff1a;延时Utilization&#xff1a;使用率Saturation&#xff1a;饱和度Errors&#xff1a;错误数或错误率 apiserver指标 400、500错误qps访问延迟队列深度 etcd指标kube-scheduler和kube-controller-manager 监控4大黄金指标 …

从手动测试菜鸟,到自动化测试老司机,实现自动化落地

虽然许多伙伴是一个测试老人了&#xff0c;但是基本上所有的测试经验都停留在手工测试方面&#xff0c;对于自动化测试方面的实战经验少之又少。 其实&#xff0c;究其原因&#xff1a;一方面是&#xff0c;自动化方面不求上进&#xff0c;觉得会手工测试就可以了&#xff0c;自…

【计算机基础】用bat命令将Unity导出PC包转成单个exe可执行文件

Unity打包成exe可执行文件 上边连接是很久以前用过的方法&#xff0c;发现操作有些不一样了&#xff0c;并且如果按上述操作比较麻烦&#xff0c;所以写了个bat命令。 图1、导出的pc程序 如图1是导出的pc程序&#xff0c;点击exe文件可运行该程序。 添加pack_project.bat文件 …

基于 SpringBoot 的在线考试系统

专业团队&#xff0c;咨询就送开题报告&#xff0c;欢迎大家私信留言&#xff0c;联系方式在文章底部 摘 要 网络的广泛应用给生活带来了十分的便利。所以把在线考试管理与现在网络相结合&#xff0c;利用java技术建设在线考试系统&#xff0c;实现在线考试的信息化管理。则对…

PX4固定翼控制器详解(五)——L1、NPFG控制器

之前已经讲解了TECS高度与速度控制器&#xff0c;今天是PX4固定翼控制器系列讲解的最后一期&#xff0c;主题是PX4的位置控制器。PX4 1.12及其之前的版本&#xff0c;使用的位置控制器为L1控制器。1.13及其之后的版本&#xff0c;PX4更新了NPFG控制器。NPFG控制器在较强风速下有…

活动目录安全

活动目录安全 1.概述2.常见攻击方式SYSVOL与GPP漏洞MS14-068漏洞Kerberoast攻击内网横移抓取管理员凭证内网钓鱼与欺骗用户密码猜解获取AD数据库文件 3.权限维持手段krbtgt账号与黄金票据服务账号与白银票据利用DSRM账号利用SID History属性利用组策略利用AdminSDHolder利用SSP…

宠物空气净化器去浮毛哪家强?希喂、美的和米家实测分享

要说养宠物后里最让我感到幸福感飙升的家电&#xff0c;必须是宠物空气净化器&#xff0c;没有之一。很多人都喜欢宠物&#xff0c;但应该没有人喜欢清扫&#xff0c;特别是家里宠物多&#xff0c;或者一群宠物在自己家聚在一起之后&#xff0c;要疯狂清除浮毛&#xff0c;真的…

剖解相交链表

相交链表 思路&#xff1a;我们计算A和B链表的长度&#xff0c;求出他们的差值&#xff08;len&#xff09;&#xff0c;让链表长的先多走len步&#xff0c;最后在A,B链表一起向后走&#xff0c;即可相逢于相交节点 实现代码如下&#xff1a; public class Solution {public …

单链表进阶

之前已经介绍过单链表及其一些简单的功能 这次来简单介绍单链表一些的其他接口 1.在指定位置之前插入数据 具体原码&#xff0c;三个参数&#xff0c;phead是链表的指针&#xff0c;pos是节点的地址&#xff0c;x是需要插入的数据。 pos不能为空指针&#xff0c;因为pos为空…

React启动时 Error: error:0308010C:digital envelope routines::unsupported

错误信息&#xff1a; 错误原因&#xff1a;通常与 Node.js 的新版本中 OpenSSL 的默认行为变化有关。从 Node.js 17 开始&#xff0c;OpenSSL 默认启用了 OpenSSL 3.0 的一些新特性&#xff0c;这可能会影响到一些旧的或未更新的库。 解决办法&#xff1a;可以通过设置环境变…

基于STM32设计的室内育苗环境管理系统(物联网)

文章目录 一、前言1.1 项目介绍【1】项目开发背景【2】设计实现的功能【3】项目硬件模块组成 1.2 设计思路1.3 系统功能总结1.4 开发工具的选择【1】设备端开发【2】上位机开发 1.5 模块的技术详情介绍【1】ESP8266-WIFI模块【2】MQ135传感器【4】DHT11传感器【5】B1750传感器 …

【Diffusion分割】FDiff-Fusion:基于模糊学习的去噪扩散融合网络

FDiff-Fusion: Denoising diffusion fusion network based on fuzzy learning for 3D medical image segmentation 摘要&#xff1a; 近年来&#xff0c;去噪扩散模型在图像分割建模中取得了令人瞩目的成就。凭借其强大的非线性建模能力和优越的泛化性能&#xff0c;去噪扩散模…

Flexus X实例全方位指南:智能迁移、跨云搬迁加速与虚机热变配能力的最佳实践

目录 前言 一、云迁移关键挑战 1、企业实例选型关键挑战 2、云算力关键挑战之一 3、云算力关键挑战之二 二、本地IT及其他云搬迁到Flexus X实例上的独有优势 1、Flexus X实例超强性能&#xff0c;遥遥领先同规格友商实例 &#xff08;1&#xff09;底层多重调优&#x…