当前位置: 首页 > news >正文

商品管理幻灯图片更换实现

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.java1234.mapper.ProductMapper"><resultMap id="productResult" type="com.java1234.entity.Product"><association property="type" column="typeId" select="com.java1234.mapper.SmallTypeMapper.findById"></association></resultMap><select id="list" parameterType="Map" resultMap="productResult">select * from t_product<where><if test="name!=null and name!='' ">and name like concat('%',#{name},'%')</if></where><if test="start!=null and pageSize!=null ">limit #{start},#{pageSize}</if></select><select id="getTotal" parameterType="Map" resultType="Long">select count(*) from t_product<where><if test="name!=null and name!='' ">and name like concat('%',#{name},'%')</if></where></select><insert id="add" parameterType="com.java1234.entity.Product">insert into t_product values(null,#{name},#{price},#{stock},#{proPic},#{hot},#{swiper},#{swiperPic},#{swiperSort},#{type.id},null,#{productIntroImgs},#{productParaImgs},#{description});</insert><update id="update" parameterType="com.java1234.entity.Product">update t_product<set><if test="name!=null and name!=''">name=#{name},</if><if test="price!=null">price=#{price},</if><if test="stock!=null">stock=#{stock},</if><if test="type!=null and type.id!=null">typeId=#{type.id},</if><if test="proPic!=null and proPic!=''">proPic=#{proPic},</if><if test="description!=null and description!=''">description=#{description},</if><if test="productIntroImgs!=null and productIntroImgs!=''">productIntroImgs=#{productIntroImgs},</if><if test="productParaImgs!=null and productParaImgs!=''">productParaImgs=#{productParaImgs},</if><if test="swiperPic!=null and swiperPic!=''">swiperPic=#{swiperPic},</if><if test="swiperSort!=null">swiperSort=#{swiperSort},</if></set>where id=#{id}</update><select id="findById" parameterType="Integer" resultMap="productResult">select * from t_product where id=#{id}</select></mapper>
package com.java1234.controller.admin;import com.java1234.entity.*;
import com.java1234.service.IProductService;
import com.java1234.util.DateUtil;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;import java.io.File;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;/*** 管理端-商品Controller控制器* @author java1234_小锋* @site www.java1234.com* @company 南通小锋网络科技有限公司* @create 2022-02-14 6:54*/
@RestController
@RequestMapping("/admin/product")
public class AdminProductController {@Autowiredprivate IProductService productService;@Value("${productImagesFilePath}")private String productImagesFilePath;@Value("${swiperImagesFilePath}")private String swiperImagesFilePath;/*** 根据条件分页查询* @param pageBean* @return*/@RequestMapping("/list")public R list(@RequestBody PageBean pageBean){System.out.println(pageBean);Map<String,Object> map=new HashMap<>();map.put("name",pageBean.getQuery().trim());map.put("start",pageBean.getStart());map.put("pageSize",pageBean.getPageSize());List<Product> productList = productService.list(map);Long total = productService.getTotal(map);Map<String,Object> resultMap=new HashMap<>();resultMap.put("productList",productList);resultMap.put("total",total);return R.ok(resultMap);}/*** 更新热门状态* @param id* @param hot* @return*/@GetMapping("/updateHot/{id}/state/{hot}")public R updateHot(@PathVariable(value = "id")Integer id,@PathVariable(value = "hot")boolean hot){Product product=productService.getById(id);product.setHot(hot);if(hot){product.setHotDateTime(new Date());}else{product.setHotDateTime(null);}productService.saveOrUpdate(product);return R.ok();}/*** 更新swiper状态* @param id* @param swiper* @return*/@GetMapping("/updateSwiper/{id}/state/{swiper}")public R updateSwiper(@PathVariable(value = "id")Integer id,@PathVariable(value = "swiper")boolean swiper){Product product=productService.getById(id);product.setSwiper(swiper);productService.saveOrUpdate(product);return R.ok();}/*** 删除* @param id* @return*/@GetMapping("/delete/{id}")public R delete(@PathVariable(value = "id")Integer id){productService.removeById(id);return R.ok();}/*** 添加或修改* @param product* @return*/@RequestMapping("/save")public R save(@RequestBody Product product){System.out.println("product"+product);if(product.getId()==null || product.getId() == -1){productService.add(product);}else{productService.update(product);}return R.ok();}/*** 上传商品大类图片* @param file* @return* @throws Exception*/@RequestMapping("/uploadImage")public Map<String,Object> uploadImage(MultipartFile file)throws Exception{Map<String,Object> resultMap=new HashMap<>();if(!file.isEmpty()){//获取文件名String originalFilename = file.getOriginalFilename();String suffixName=originalFilename.substring(originalFilename.lastIndexOf("."));String newFileName= DateUtil.getCurrentDateStr() + suffixName;FileUtils.copyInputStreamToFile(file.getInputStream(),new File(productImagesFilePath+newFileName));resultMap.put("code",0);resultMap.put("msg","上传成功");Map<String,Object> dataMap=new HashMap<>();dataMap.put("title",newFileName);dataMap.put("src","/image/product/"+newFileName);resultMap.put("data",dataMap);}return resultMap;}/*** 上传swiper幻灯图片* @param file* @return* @throws Exception*/@RequestMapping("/uploadSwiperImage")public Map<String,Object> uploadSwiperImage(MultipartFile file)throws Exception{Map<String,Object> resultMap=new HashMap<>();if(!file.isEmpty()){//获取文件名String originalFilename = file.getOriginalFilename();String suffixName=originalFilename.substring(originalFilename.lastIndexOf("."));String newFileName= DateUtil.getCurrentDateStr() + suffixName;FileUtils.copyInputStreamToFile(file.getInputStream(),new File(swiperImagesFilePath+newFileName));resultMap.put("code",0);resultMap.put("msg","上传成功");Map<String,Object> dataMap=new HashMap<>();dataMap.put("title",newFileName);dataMap.put("src","/image/swiper/"+newFileName);resultMap.put("data",dataMap);}return resultMap;}
}
server:port: 8080servlet:context-path: /spring:datasource:type: com.alibaba.druid.pool.DruidDataSourcedriver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://localhost:3306/db_java1234_mall_v3?serverTimezone=Asia/Shanghaiusername: rootpassword: 123456mybatis-plus:global-config:db-config:id-type: auto #id生成规则:数据库id自增configuration:map-underscore-to-camel-case: false  # 开启驼峰功能auto-mapping-behavior: full # 自动映射任何复杂的结果log-impl: org.apache.ibatis.logging.stdout.StdOutImplmapper-locations: classpath:mybatis/mapper/*.xmlweixin:jscode2sessionUrl: https://api.weixin.qq.com/sns/jscode2sessionappid: wx8a1b5168c6b661afsecret: 56cd2d8dbc9d5ebcc759e48a62131be0#微信支付配置# appid# mch_id 商户号# key 商户的key【API密匙】# url api请求地址# notify_url 服务器异步通知页面路径weixinpayconfig:appid: wx8a1b5168c6b661afmch_id: 换成你的key: jrBXpy1VPNY0FCFI42EBShLom7KMaRBaurl: https://api.mch.weixin.qq.com/pay/unifiedordernotify_url: https://2c23-222-184-165-54.ngrok.io/weixinpay/notifyUrlbigTypeImagesFilePath: D://java1234-mall-v3/bigTypeImgs/productImagesFilePath: D://java1234-mall-v3/productImgs/swiperImagesFilePath: D://java1234-mall-v3/swiperImgs/
<template><el-dialogmodel-value="swiperImageDialogVisible"title="幻灯设置"width="30%"@close="handleClose"center><el-formref="formRef":model="form"label-width="100px"style="text-align: center":rules="rules"><el-form-item label="排列序号" prop="swiperSort"><el-input v-model="form.swiperSort" style="width: 100px"/></el-form-item><el-upload:headers="headers"class="avatar-uploader":action="getServerUrl()+'/admin/product/uploadSwiperImage'":show-file-list="false":on-success="handleAvatarSuccess":before-upload="beforeAvatarUpload"><img v-if="imageUrl" :src="imageUrl" class="avatar" /><el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon></el-upload></el-form><template #footer><span class="dialog-footer"><el-button type="primary" @click="handleConfirm">确认更换</el-button></span></template></el-dialog>
</template><script setup>import {defineEmits, defineProps, ref, watch} from "vue";
import axios,{getServerUrl} from "@/util/axios";
import { ElMessage } from 'element-plus'
import { Plus } from '@element-plus/icons-vue'const tableData=ref([])const props=defineProps({imageDialogValue:{type:Object,default:()=>{},required:true}}
)const headers=ref({token:window.sessionStorage.getItem("token")
})const rules=ref({swiperSort:[{required: true,message:'请输入排列序号'},{type:'number',message: '排序序号必须是数值类型',transform: (value) => Number(value)}]
})const form=ref({id:-1,swiperPic:'',swiperSort:0
})const formRef=ref(null)const imageUrl=ref("")watch(()=>props.imageDialogValue,()=>{form.value=props.imageDialogValue;imageUrl.value=getServerUrl()+'/image/swiper/'+form.value.swiperPic},{deep:true,immediate:true}
)const emits=defineEmits(['update:modelValue','initProductList'])const handleClose=()=>{emits('update:modelValue',false)
}const handleAvatarSuccess=(res)=>{imageUrl.value=getServerUrl()+res.data.srcform.value.swiperPic=res.data.title;
}const beforeAvatarUpload = (file) => {const isJPG = file.type === 'image/jpeg'const isLt2M = file.size / 1024 / 1024 < 2if (!isJPG) {ElMessage.error('图片必须是jpg格式')}if (!isLt2M) {ElMessage.error('图片大小不能超过2M!')}return isJPG && isLt2M
}const handleConfirm=async()=>{formRef.value.validate(async(valid)=>{if(valid){let result=await axios.post("admin/product/save",form.value);let data=result.data;if(data.code==0){ElMessage.success("执行成功!")formRef.value.resetFields();emits("initProductList")handleClose();}else{ElMessage.error(data.msg);}}});}</script><style>.avatar-uploader .el-upload {border: 1px dashed #d9d9d9;border-radius: 6px;cursor: pointer;position: relative;overflow: hidden;
}
.avatar-uploader .el-upload:hover {border-color: #409eff;
}
.el-icon.avatar-uploader-icon {font-size: 28px;color: #8c939d;width: 178px;height: 178px;text-align: center;
}
.avatar {width: 178px;height: 178px;display: block;
}</style>
<template><el-card><el-row :gutter="20" class="header"><el-col :span="7"><el-input placeholder="请输入商品名称..." clearable v-model="queryForm.query"></el-input></el-col><el-button type="primary" :icon="Search" @click="initProductList">搜索</el-button><el-button type="primary" @click="handleDialogValue()">添加商品</el-button></el-row><el-table :data="tableData" stripe style="width: 100%"><el-table-column prop="name" label="商品名称" width="200" fixed/><el-table-column prop="image" label="商品图片" width="150" align="center"><template v-slot="scope"><img :src="getServerUrl()+'/image/product/'+scope.row.proPic" width="80" height="80"/></template></el-table-column><el-table-column prop="price" label="商品价格" width="100" /><el-table-column prop="stock" label="商品库存" width="200" /><el-table-column prop="type" label="商品类别" width="200"  :formatter="typeNameFormatter"/><el-table-column prop="hot" label="热卖?" width="100" align="center"><template v-slot="{row}"><el-switch v-model="row.hot" @change="hotChangeHandle(row)"></el-switch></template></el-table-column><el-table-column prop="swiper" label="首页幻灯?" width="100" align="center"><template v-slot="{row}"><el-switch v-model="row.swiper"  @change="swiperChangeHandle(row)"></el-switch></template></el-table-column><el-table-column prop="swiperPic" label="幻灯图片" width="150" align="center"><template v-slot="scope"><img :src="getServerUrl()+'/image/swiper/'+scope.row.swiperPic" width="150" height="75"/></template></el-table-column><el-table-column prop="swiperSort" label="幻灯排序" width="150" align="center"/><el-table-column prop="description" label="商品描述" width="400"/><el-table-column prop="action" label="操作" width="500" fixed="right"><template v-slot="scope"><el-button type="success"  @click="handleImageDialogValue(scope.row)">更换图片</el-button><el-button type="primary"  @click="handleSwiperImageDialogValue(scope.row)">幻灯设置</el-button><el-button type="primary" :icon="Edit" @click="handleDialogValue(scope.row)"></el-button><el-button type="danger" :icon="Delete" @click="handleDelete(scope.row.id)"></el-button><el-button type="primary" :icon="Edit" @click="handleDialogValue(scope.row)">轮播图设置</el-button></template></el-table-column></el-table><el-paginationv-model:currentPage="queryForm.pageNum":page-sizes="[10, 20, 30, 40,50]":page-size="queryForm.pageSize":small="small":disabled="disabled":background="background"layout="total, sizes, prev, pager, next, jumper":total="total"@size-change="handleSizeChange"@current-change="handleCurrentChange"></el-pagination></el-card><Dialog v-model="dialogVisible" :dialogTitle="dialogTitle" @initProductList="initProductList"  :dialogValue="dialogValue"/><ImageDialog v-model="imageDialogVisible" :imageDialogValue="imageDialogValue" @initProductList="initProductList"></ImageDialog><SwiperImageDialog v-model="swiperImageDialogVisible" :imageDialogValue="imageDialogValue" @initProductList="initProductList"></SwiperImageDialog>
</template><script setup>import {Search,Edit,Delete } from '@element-plus/icons-vue'
import { ref } from 'vue'
import  axios,{ getServerUrl }  from '@/util/axios'
import Dialog from './components/dialog'
import ImageDialog from './components/imageDialog'
import SwiperImageDialog from './components/swiperImageDialog'
import {ElMessageBox,ElMessage} from 'element-plus'const queryForm=ref({query:'',pageNum:1,pageSize:10
})const total=ref(0)const tableData=ref([
])const dialogValue=ref({})
const dialogVisible=ref(false)
const dialogTitle=ref('')const imageDialogVisible=ref(false)const imageDialogValue=ref({})const swiperImageDialogVisible=ref(false)const initProductList=async()=>{console.log('xxx')const res=await axios.post("admin/product/list",queryForm.value);tableData.value=res.data.productList;total.value=res.data.total;
}initProductList();const handleSizeChange=(pageSize)=>{queryForm.value.pageNum=1;queryForm.value.pageSize=pageSize;initProductList();
}const handleCurrentChange=(pageNum)=>{queryForm.value.pageNum=pageNum;initProductList();
}const handleImageDialogValue=(row)=>{imageDialogValue.value=JSON.parse(JSON.stringify(row))imageDialogVisible.value=true
}const handleSwiperImageDialogValue=(row)=>{imageDialogValue.value=JSON.parse(JSON.stringify(row))swiperImageDialogVisible.value=true
}const handleDialogValue = (row) => {if(row){dialogValue.value=JSON.parse(JSON.stringify(row));dialogTitle.value="商品修改"}else{dialogValue.value={bigType:{id:""}}dialogTitle.value="商品添加"}dialogVisible.value=true;
}const handleDelete = (id) => {ElMessageBox.confirm('您确定要删除这条记录吗?','系统提示',{confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning',}).then(async() => {console.log("id="+id)let res=await axios.get("admin/product/delete/"+id);if(res.data.code==0){ElMessage({type: 'success',message: '删除成功!',});initProductList();}else{ElMessage({type: 'error',message: res.data.msg,});}}).catch(() => {})
}const typeNameFormatter=(row)=>{return row.type.name
}const hotChangeHandle=async(row)=>{let res = await axios.get("admin/product/updateHot/"+row.id+"/state/"+row.hot);if(res.data.code==0){ElMessage({type:'success',message:'执行成功!',})}else{ElMessage({type: 'error',message:  res.data.msg,})initProductList();}
}const swiperChangeHandle=async(row)=>{let res = await axios.get("admin/product/updateSwiper/"+row.id+"/state/"+row.swiper);if(res.data.code==0){ElMessage({type:'success',message:'执行成功!',})}else{ElMessage({type: 'error',message:  res.data.msg,})initProductList();}
}</script><style lang="scss" scoped>.header{padding-bottom: 16px;box-sizing: border-box;
}.el-pagination{padding-top: 15px;box-sizing: border-box;
}</style>

相关文章:

商品管理幻灯图片更换实现

<?xml version"1.0" encoding"UTF-8" ?> <!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace"com.java1234.mapper.ProductMappe…...

tomcat下载与使用教程

1. tomcat下载 官网&#xff1a;https://tomcat.apache.org/ 镜像地址&#xff1a;https://mirrors.huaweicloud.com/apache/tomcat/ 1、选择一个版本下载&#xff0c;官网下载速度缓慢&#xff0c;推荐镜像 2、对压缩包进行解压&#xff0c;无需进行安装&#xff0c;解压放…...

通过 Elasticsearch 和 Go 使用混合搜索进行地鼠狩猎

作者&#xff1a;CARLY RICHMOND&#xff0c;LAURENT SAINT-FLIX 就像动物和编程语言一样&#xff0c;搜索也经历了不同实践的演变&#xff0c;很难在其中做出选择。 在本系列的最后一篇博客中&#xff0c;Carly Richmond 和 Laurent Saint-Flix 将关键字搜索和向量搜索结合起…...

【LIUNX】配置缓存DNS服务

配置缓存DNS服务 A.安装bind bind-utils1.尝试修改named.conf配置文件2.测试nslookup B.修改named.conf配置文件1.配置文件2.再次测试 缓存DNS服务器&#xff1a;只提供域名解析结果的缓存功能&#xff0c;目的在于提高数据查询速度和效率&#xff0c;但是没有自己控制的区域地…...

Arduino驱动A01NYUB防水超声波传感器(超声波传感器)

目录 1、传感器特性 2、控制器和传感器连线图 3、通信协议 4、驱动程序 A01NYUB超声波测距传感器是一款通过发射和接收机械波来感应物体距离的电子传感器。该款产品具有监测距离远、范围广、防水等优点,且具有一定的穿透能力(烟雾、粉尘等)。该产品带有可拆卸式喇叭口,安…...

curl(八)时间和环境变量以及配置

一 时间 ① --connect-timeout 连接超时时间 ② -m | --max-time 数据最大传输时间 -m&#xff1a; 限制curl 完成时间(overall time limit)-m,--max-time <seconds> 整个交互完成的超时时间场景&#xff1a; 通过设置-m参数,可以避免请求时间过长而导致的超时错误…...

K8S知识点(十)

&#xff08;1&#xff09;Pod详解-启动命令 创建Pod&#xff0c;里面的两个容器都正常运行 &#xff08;2&#xff09;Pod详解-环境变量 &#xff08;3&#xff09;Pod详解-端口设置 &#xff08;4&#xff09;Pod详解-资源配额 修改&#xff1a;memory 不满足条件是不能正常…...

Netty实现通信框架

一、LengthFieldBasedFrameDecoder的参数解释 1、LengthFieldBasedFrameDecoder的构造方法参数 看下最多参数的构造方法 /*** Creates a new instance.** param byteOrder* the {link ByteOrder} of the length field* param maxFrameLength* the maximum len…...

【OpenCV实现图像:用OpenCV图像处理技巧之白平衡算法】

文章目录 概要加载样例图像统计数据分析White Patch Algorithm小结 概要 白平衡技术在摄影和图像处理中扮演着至关重要的角色。在不同的光照条件下&#xff0c;相机可能无法准确地捕捉到物体的真实颜色&#xff0c;导致图像呈现出暗淡、色调不自然或者褪色的效果。为了解决这个…...

文件包含 [ZJCTF 2019]NiZhuanSiWei1

打开题目 代码审计 if(isset($text)&&(file_get_contents($text,r)"welcome to the zjctf")){ 首先isset函数检查text参数是否存在且不为空 用file_get_contents函数读取text制定的文件内容并与welcome to the zjctf进行强比较 echo "<br><h…...

Java网络编程基础内容

IP地址 域名解析&#xff1a; 本机访问域名时&#xff0c;会从本地的DNS上解析数据&#xff08;每个电脑都有&#xff09;&#xff0c;如果有&#xff0c;获取其对应的IP&#xff0c;通过IP访问服务器。如果本地没有&#xff0c;会去网络提供商的DNS找域名对应的IP&#xff0…...

DevChat:开发者专属的基于IDE插件化编程协助工具

DevChat&#xff1a;开发者专属的基于IDE插件化编程协助工具 一、DevChat 的介绍1.1 DevChat 简介1.2 DevChat 优势 二、DevChat 在 VSCode 上的使用2.1 安装 DevChat2.2 注册 DevChat2.3 使用 DevChat 三、DevChat 的实战四、总结 一、DevChat 的介绍 在AI浪潮的席卷下&#x…...

Python数据容器之[列表]

Python数据容器 Python中的数据容器&#xff1a; 一种可以容纳多份数据的数据类型&#xff0c;容纳的每一份数据称之为1个元素 每一个元素&#xff0c;可以是任意类型的数据&#xff0c;如字符串、数字、布尔等。 数据容器根据特点的不同&#xff0c;如&#xff1a; 是否支…...

大咖直播间”系列直播课第一期——如何抓住HarmonyOS带来的机遇?

想了解#HarmonyOS#背后隐藏着怎样的商业机遇&#xff1f; 想成功搭上万物互联快车&#xff0c;与HarmonyOS一起发展壮大&#xff1f; 想知道开发者应该怎样把握时代机遇&#xff0c;实现高质高效就业&#xff1f; 答案尽在#华为开发者学堂#《大咖直播间》第一期课程&#xff0c…...

跨域:利用JSONP、WebSocket实现跨域访问

跨域基础知识点&#xff1a;跨域知识点 iframe实现跨域的四种方式&#xff1a;iframe实现跨域的四种方式 注&#xff1a;本篇中使用到的虚拟主机也是上面iframe中配置的 目录 JSONP跨域 JSONP介绍 跨域实验&#xff1a; WebSocket跨域 websocket介绍 跨域实验 JSONP跨域 …...

java项目之戒烟网站(ssm+vue)

项目简介 戒烟网站实现了以下功能&#xff1a; 用户可以对首页&#xff0c;用户分享&#xff0c;论坛交流&#xff0c;公告文章&#xff0c;个人中心&#xff0c;后台管理等功能进行操作。 管理员可以对网站所有功能进行管理&#xff0c;包括管理用户的基本信息。 &#x1f4…...

Redis集群,你真的学会了吗?

目录 1、为什么引入集群 1.1、先来了解集群是什么 1.2、哨兵模式的缺陷 引入集群解决了什么问题 1.3、使用集群&#xff0c;如何存储数据 2、三种主流的分片方式【经典面试题】 2.1、哈希求余算法 2.1.1、哈希求余算法的介绍 2.1.2、哈希求余算法如何扩容 2.2、一致性…...

手机地磁传感器与常见问题

在手机中&#xff0c;存在不少传感器&#xff0c;例如光距感&#xff0c;陀螺仪&#xff0c;重力加速度&#xff0c;地磁等。关于各传感器&#xff0c;虽功能作用大家都有所了解&#xff0c;但是在研发设计debug过程中&#xff0c;却总是会遇到很多头疼的问题。关于传感器&…...

EF Core 数据库映射成实体类

首先在 NuGet 包管理器中安装三个包 Microsoft.EntityFrameworkCore.SqlServer 是一个用于与 SQL Server 数据库进行交互的实体框架核心包。这个包提供了方便的方法和工具&#xff0c;用于在 .NET Core 应用程序中操作 SQL Server 数据库。 Microsoft.EntityFrameworkCore.Too…...

【算法优选】 动态规划之斐波那契数列模型

文章目录 &#x1f38b;前言&#x1f340;[第 N 个泰波那契数](https://leetcode.cn/problems/n-th-tribonacci-number/)&#x1f6a9;题目描述&#x1f6a9;算法流程&#x1f6a9;代码实现 &#x1f384;[使用最小花费爬楼梯](https://leetcode.cn/problems/min-cost-climbing…...

React Native 开发环境搭建(全平台详解)

React Native 开发环境搭建&#xff08;全平台详解&#xff09; 在开始使用 React Native 开发移动应用之前&#xff0c;正确设置开发环境是至关重要的一步。本文将为你提供一份全面的指南&#xff0c;涵盖 macOS 和 Windows 平台的配置步骤&#xff0c;如何在 Android 和 iOS…...

java 实现excel文件转pdf | 无水印 | 无限制

文章目录 目录 文章目录 前言 1.项目远程仓库配置 2.pom文件引入相关依赖 3.代码破解 二、Excel转PDF 1.代码实现 2.Aspose.License.xml 授权文件 总结 前言 java处理excel转pdf一直没找到什么好用的免费jar包工具,自己手写的难度,恐怕高级程序员花费一年的事件,也…...

大语言模型如何处理长文本?常用文本分割技术详解

为什么需要文本分割? 引言:为什么需要文本分割?一、基础文本分割方法1. 按段落分割(Paragraph Splitting)2. 按句子分割(Sentence Splitting)二、高级文本分割策略3. 重叠分割(Sliding Window)4. 递归分割(Recursive Splitting)三、生产级工具推荐5. 使用LangChain的…...

【SQL学习笔记1】增删改查+多表连接全解析(内附SQL免费在线练习工具)

可以使用Sqliteviz这个网站免费编写sql语句&#xff0c;它能够让用户直接在浏览器内练习SQL的语法&#xff0c;不需要安装任何软件。 链接如下&#xff1a; sqliteviz 注意&#xff1a; 在转写SQL语法时&#xff0c;关键字之间有一个特定的顺序&#xff0c;这个顺序会影响到…...

Java 加密常用的各种算法及其选择

在数字化时代&#xff0c;数据安全至关重要&#xff0c;Java 作为广泛应用的编程语言&#xff0c;提供了丰富的加密算法来保障数据的保密性、完整性和真实性。了解这些常用加密算法及其适用场景&#xff0c;有助于开发者在不同的业务需求中做出正确的选择。​ 一、对称加密算法…...

vue3+vite项目中使用.env文件环境变量方法

vue3vite项目中使用.env文件环境变量方法 .env文件作用命名规则常用的配置项示例使用方法注意事项在vite.config.js文件中读取环境变量方法 .env文件作用 .env 文件用于定义环境变量&#xff0c;这些变量可以在项目中通过 import.meta.env 进行访问。Vite 会自动加载这些环境变…...

免费PDF转图片工具

免费PDF转图片工具 一款简单易用的PDF转图片工具&#xff0c;可以将PDF文件快速转换为高质量PNG图片。无需安装复杂的软件&#xff0c;也不需要在线上传文件&#xff0c;保护您的隐私。 工具截图 主要特点 &#x1f680; 快速转换&#xff1a;本地转换&#xff0c;无需等待上…...

Web中间件--tomcat学习

Web中间件–tomcat Java虚拟机详解 什么是JAVA虚拟机 Java虚拟机是一个抽象的计算机&#xff0c;它可以执行Java字节码。Java虚拟机是Java平台的一部分&#xff0c;Java平台由Java语言、Java API和Java虚拟机组成。Java虚拟机的主要作用是将Java字节码转换为机器代码&#x…...

LabVIEW双光子成像系统技术

双光子成像技术的核心特性 双光子成像通过双低能量光子协同激发机制&#xff0c;展现出显著的技术优势&#xff1a; 深层组织穿透能力&#xff1a;适用于活体组织深度成像 高分辨率观测性能&#xff1a;满足微观结构的精细研究需求 低光毒性特点&#xff1a;减少对样本的损伤…...

【51单片机】4. 模块化编程与LCD1602Debug

1. 什么是模块化编程 传统编程会将所有函数放在main.c中&#xff0c;如果使用的模块多&#xff0c;一个文件内会有很多代码&#xff0c;不利于组织和管理 模块化编程则是将各个模块的代码放在不同的.c文件里&#xff0c;在.h文件里提供外部可调用函数声明&#xff0c;其他.c文…...