SpringBoo+vue3+vite整合讯飞星火3.5通过webscoket实现聊天功能(前端代码)附带展示效果

访问地址: 
天梦星服务平台 (tmxkj.top)icon-default.png?t=N7T8https://tmxkj.top/#/site

 后端文档:

SpringBoo+vue3整合讯飞星火3.5通过webscoket实现聊天功能(全网首发)附带展示效果_springboot websocket vue3-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/qq_53722480/article/details/139107409

1.样式库我使用了 tailwindcss,找到tailwindcss,里面有安装教程,不使用可以跳过,样式自己重新写也可以

 2.vue html

<template>
<div class="theme-controller bg-base-200 pt-1 pb-1 w-full d-flex justify-center items-center">
<div class="content-container "><!--侧边栏--><div class="side"><div class="h-full w-full  bg-base-300 rounded-r-3xl "><div class="side-logo d-flex align-center text-base-0"><img style="width: 35px;height: 35px" class="rounded-md" src="../assets/Logo.png"> </img><span class="ml-4 text-2xl font-weight-bold">AI人工智能助手</span></div><div class="side-api d-flex items-center"><el-button style="height: 40px;" class="w-36  bg-info border-0"><svg t="1715778624612" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4291" width="18" height="18"><path d="M760.32 183.466667h-13.653333v-59.733334a57.173333 57.173333 0 0 0-114.346667 0v59.733334H400.213333v-59.733334a57.173333 57.173333 0 0 0-114.346666 0v59.733334h-16.213334c-75.946667 0-138.24 61.44-138.24 138.24v494.08c0 75.946667 61.44 138.24 138.24 138.24H759.466667c75.946667 0 138.24-61.44 138.24-138.24V321.706667c0.853333-75.946667-61.44-138.24-137.386667-138.24zM515.413333 296.96c85.333333 0 154.453333 69.12 154.453334 154.453333 0 85.333333-69.12 154.453333-154.453334 154.453334-85.333333 0-154.453333-69.12-154.453333-154.453334 0-86.186667 69.12-154.453333 154.453333-154.453333zM748.373333 742.4c0 52.906667-42.666667 95.573333-95.573333 95.573333H378.026667c-52.906667 0-95.573333-42.666667-95.573334-95.573333 0-52.906667 42.666667-95.573333 95.573334-95.573333h273.92c52.906667 0 96.426667 42.666667 96.426666 95.573333z" p-id="4292" fill="#ffffff"></path></svg><span class="mt-0.5 ml-1">账户中心</span></el-button><el-button style="height: 40px;" class="w-36  bg-info border-0"><svg t="1715779300040" class="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8561" width="18" height="18"><path d="M924.17025 258.44833h0.04335c-55.093306 0-103.987667-35.705346-121.41046-88.638413l-5.639017-17.198822C779.74133 99.674415 730.836131 63.940169 675.742825 63.940169H348.239112c-55.093306 0-104.009342 35.734246-121.432134 88.667313L221.175186 169.784629C203.741555 222.728534 154.836357 258.441106 99.743051 258.441106H99.703314c-19.738366 0-35.763145 16.209013-35.763145 36.20025V777.035613h0.469617l397.129861 172.493959a126.731582 126.731582 0 0 0 100.920706 0L959.590214 777.035613h0.234808V294.644969c0-19.991237-15.916406-36.196638-35.654772-36.196639zM895.884854 734.860388l-358.989731 155.992338a62.495193 62.495193 0 0 1-49.931131 0L127.880338 734.860388V320.296897a187.991322 187.991322 0 0 0 31.699152-7.557222 192.21065 192.21065 0 0 0 94.609775-68.997583 193.821798 193.821798 0 0 0 27.714631-53.944551L287.550138 172.598719C296.357265 145.870284 320.748452 127.880338 348.239112 127.880338h327.503713c27.50511 0 51.89991 17.989946 60.688974 44.718381l5.649855 17.187985A193.312444 193.312444 0 0 0 811.715027 285.621096a190.660914 190.660914 0 0 0 52.586273 27.118579 195.34986 195.34986 0 0 0 31.583554 7.557222v414.563491z" fill="#ffffff" p-id="8562"></path><path d="M511.998194 255.999097c-141.383635 0-255.999097 114.615462-255.999097 255.999097S370.614559 768.004516 511.998194 768.004516 768.004516 653.385441 768.004516 511.998194s-114.619075-255.999097-256.006322-255.999097z m177.009507 330.736846a192.904239 192.904239 0 1 1 15.056646-74.737749 191.936105 191.936105 0 0 1-15.071096 74.741361z" fill="#ffffff" p-id="8563"></path><path d="M596.052423 425.393583l-105.392906 105.392906-62.726389-62.72639a31.970084 31.970084 0 0 0-45.213286 45.213286l85.333032 85.333032a31.970084 31.970084 0 0 0 45.213286 0l127.999548-127.999548A31.970084 31.970084 0 0 0 596.052423 425.393583z" fill="#ffffff" p-id="8564"></path></svg><span class="mt-0.5 ml-1">申请接口</span></el-button></div><div class="side-talke d-flex justify-center items-center"><div class="talke d-flex justify-center items-center bg-warning cursor-pointer"><svg t="1715779790026" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13505" width="21" height="21"><path d="M908.8 305.6c-5.4-10.5-16.3-17.8-28.9-17.8-17.8 0-32.2 14.4-32.2 32.1 0 6 1.7 11.7 4.6 16.5l-0.1 0.1c26.9 52.4 42.1 111.8 42.1 174.7 0 211.6-171.6 383.2-383.2 383.2S127.8 722.8 127.8 511.2 299.4 128.1 511 128.1c62.5 0 121.5 15 173.6 41.5l0.2-0.4c4.6 2.6 10 4.1 15.7 4.1 17.8 0 32.2-14.4 32.2-32.1 0-13.1-7.9-24.4-19.3-29.4C652.6 80.9 583.9 63.5 511 63.5 263.7 63.5 63.2 264 63.2 511.2S263.7 958.9 511 958.9s447.7-200.4 447.7-447.7c0-74.1-18-144-49.9-205.6z" fill="#ffffff" p-id="13506"></path><path d="M770.7 219.7a32.2 32.1 0 1 0 64.4 0 32.2 32.1 0 1 0-64.4 0Z" fill="#ffffff" p-id="13507"></path><path d="M512.4 704.1c17.5 0 31.9-14.3 31.9-31.9V544.3h127.8c17.5 0 31.9-14.3 31.9-31.9 0-17.5-14.3-31.9-31.9-31.9H544.3V352.6c0-17.5-14.3-31.9-31.9-31.9-17.5 0-31.9 14.3-31.9 31.9v127.9h-128c-17.5 0-31.9 14.3-31.9 31.9 0 17.6 14.4 31.9 31.9 31.9h128v127.9c0 17.5 14.3 31.9 31.9 31.9z" fill="#ffffff" p-id="13508"></path></svg><span class="ml-1">新建对话</span></div></div><div class="side-history d-flex items-center text-base-0"><div class="h-full d-flex flex-column justify-center align-center" @click="modelTypeFun(true)"><div class="h-full w-full d-flex justify-center align-center">历时对话</div><div class="w-full h-0.5" :class="modelType? 'bg-amber-50':''"></div></div><div  class="h-full d-flex flex-column justify-center align-center" @click="modelTypeFun(false)"><div class="h-full w-full d-flex justify-center align-center">助手列表</div><div  class="w-full h-0.5" :class="modelType? '':'bg-amber-50'"></div></div></div><div class="side-content bg-base-100 touch-pan-y overflow-auto" v-if="modelType"><div v-for="(item,index) in historyList" @mouseenter="deleteIndexFun(true,index)" @mouseleave="deleteIndexFun(false,index)" @click="selectItemFun(item)" class="h-14 pl-5 d-flex justify-space-betweenalign-center pr-5 w-full hover:bg-base-200"><div class="line-clamp-1">{{item.title}}</div><div v-show="deleteIndex===index" @click="deleteSparkChatFun([item])"><svg t="1716195021573" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1505" width="28" height="28"><path d="M839.68 307.2H184.32a40.96 40.96 0 0 1 0-81.92h655.36a40.96 40.96 0 1 1 0 81.92zM593.92 184.32h-163.84a40.96 40.96 0 1 1 0-81.92h163.84a40.96 40.96 0 0 1 0 81.92zM389.12 716.8V430.08a40.96 40.96 0 0 1 81.92 0v286.72a40.96 40.96 0 0 1-81.92 0z m163.84 0V430.08a40.96 40.96 0 0 1 81.92 0v286.72a40.96 40.96 0 0 1-81.92 0zM266.24 348.16a40.96 40.96 0 0 1 40.96 40.96v409.6a40.96 40.96 0 0 0 40.96 40.96h327.68a40.96 40.96 0 0 0 40.96-40.96V389.12a40.96 40.96 0 1 1 81.92 0v409.6a122.88 122.88 0 0 1-122.88 122.88H348.16a122.88 122.88 0 0 1-122.88-122.88V389.12a40.96 40.96 0 0 1 40.96-40.96z" fill="#f75959" p-id="1506"></path></svg></div></div></div><div class="side-content bg-base-100 touch-pan-y overflow-auto" v-else><div v-for="item in assistantList" class="h-14 pl-5 d-flex align-center pr-5 w-full hover:bg-base-200"><div :title="item.modelDescribe"><div>{{item.modelName}}</div><div class="text-xs line-clamp-1">{{item.modelDescribe}}</div></div><div></div></div></div><div class="side-foot d-flex pl-5 pr-5 justify-space-between align-center pr-5 w-full "><div class="d-flex align-center"><svg t="1715781825072"  viewBox="0 0 1372 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="51787" width="30" height="30"><path d="M696.145702 6.492596c230.726809 0 419.60034 179.243574 434.938553 406.13583l0.152511 2.788765 5.882553 1.220086c133.12 28.977021 232.034043 146.083404 235.302128 285.478127l0.065362 7.102639c0 165.408681-134.078638 299.487319-299.48732 299.487319H319.291915C153.905021 1008.705362 19.826383 874.626723 19.826383 709.218043c0-142.488511 100.003404-263.102638 235.367489-292.602554l5.860766-1.198298 0.196085-2.83234C276.392851 188.198128 461.344681 10.392511 688.650894 6.53617z m0 65.361702c-204.647489 0-370.557277 165.909787-370.579064 370.034383l0.522894 31.417191-29.979234 2.941277c-119.17617 11.699745-210.944 112.313191-210.944 232.970894 0 129.307234 104.818383 234.125617 234.125617 234.125617H1073.021277c129.307234 0 234.125617-104.796596 234.125617-234.125617 0-120.657702-91.724255-221.271149-210.900426-232.949107l-29.543489-2.897702 0.043574-29.696-0.065362-8.279149c-3.747404-201.422979-168.197447-363.541787-370.513702-363.541787zM608.909617 379.533617c11.002553 0 20.174979 2.091574 27.539064 6.252936 7.342298 4.161362 13.290213 9.542809 17.821957 16.100766 4.509957 6.53617 8.322723 13.595234 11.438298 21.133617 3.093787 7.538383 7.037277 17.604085 11.830468 30.197107l101.855319 251.577191 2.069788 5.098213c6.601532 16.558298 9.891404 28.759149 9.891404 36.667915 0 9.041702-3.769191 17.320851-11.285787 24.859234a37.147234 37.147234 0 0 1-27.277617 11.329361c-6.209362 0-11.525447-1.132936-15.948256-3.333446a32.680851 32.680851 0 0 1-11.176851-9.06349c-3.006638-3.790979-6.252936-9.651745-9.695319-17.538723a1028.531745 1028.531745 0 0 1-8.932766-20.87217l-18.606298-48.955915h-158.502127l-18.628085 50.001702-1.960852 5.163574c-6.427234 16.689021-11.982979 28.127319-16.645446 34.336681-5.141787 6.819404-13.573447 10.24-25.273192 10.24-9.934979 0-18.693447-3.638468-26.318979-10.893617-7.625532-7.276936-11.438298-15.512511-11.438297-24.750298 0-5.316085 0.871489-10.806468 2.658042-16.471149 1.764766-5.664681 4.706043-13.573447 8.780255-23.682723l99.720171-253.189447 1.786553-4.531745 8.453447-21.65651a132.466383 132.466383 0 0 1 12.767319-25.403915c4.531745-6.754043 10.457872-12.200851 17.821957-16.340426 7.364085-4.183149 16.449362-6.274723 27.25583-6.274723z m282.711149 0c11.89583 0 21.504 3.943489 28.868085 11.830468 7.364085 7.908766 11.02434 19.913532 11.02434 36.057872v307.178213l-0.108936 4.706043c-0.653617 13.791319-4.292085 24.270979-10.915404 31.460766-7.364085 7.974128-16.994043 11.982979-28.868085 11.982978-11.329362 0-20.697872-4.052426-28.04017-12.113702-7.364085-8.061277-11.046128-20.08783-11.046128-36.036085v-307.2l0.130723-5.163574c0.718979-13.399149 4.313872-23.639149 10.762894-30.72 7.276936-7.995915 16.667234-11.982979 28.192681-11.982979z m-283.234043 83.249021l-57.714383 160.898724h116.496341l-58.781958-160.898724z" fill="#ffffff" p-id="51788"></path></svg><span class="ml-2 text-xl">天梦星开发平台</span></div><div class="-rotate-90 cursor-pointer "><svg t="1715780362871" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="44227" width="20" height="20"><path d="M484.864 281.2928l-304.64 304.64a38.4 38.4 0 1 0 54.3232 54.3232L512 362.752l277.4528 277.504a38.2976 38.2976 0 0 0 54.272 0 38.4 38.4 0 0 0 0-54.3232l-304.64-304.64a39.424 39.424 0 0 0-54.2208 0z" fill="#ffffff" p-id="44228"></path><path d="M512 12.8C236.7488 12.8 12.8 236.7488 12.8 512s223.9488 499.2 499.2 499.2a496.4864 496.4864 0 0 0 448.3072-279.296 38.4 38.4 0 0 0-68.9152-33.8944A420.096 420.096 0 0 1 512 934.4c-232.9088 0-422.4-189.4912-422.4-422.4S279.0912 89.6 512 89.6s422.4 189.4912 422.4 422.4a38.4 38.4 0 0 0 76.8 0c0-275.2512-223.9488-499.2-499.2-499.2z" fill="#ffffff" p-id="44229"></path></svg></div></div></div></div><!--接收内容聊天框--><div class="content "><div class="content-body" ref="scrollContainer"><div class="item-content bg-base-300 rounded-lg position-relative mt-2 p-5" v-for="item in sparkList"><div class="position-absolute -mt-5 -ml-16 z-50"><el-image style="width: 40px;height: 40px" class="rounded-full" :src="userInfo?.image? configuration.visitFileUrl+userInfo.image :'https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg'"></el-image></div><div v-if="item.type==='send'" class="text-span">{{item.content.text}}</div><div v-else><keep-alive v-for="item2 in item.content"><div v-if="item2.type" class="w-full bg-base-100 rounded-t-md rounded-r-md mt-2 mb-2 rounded-md"><div class="d-flex justify-space-between align-center rounded-t-md rounded-r-md  p-3 w-full bg-base-200"><div class="font-weight-bold text-span">{{returnFirst(item2.text)}}</div><div @click="copyContentFun(item2.text)" class="text-sm cursor-pointer">复制代码</div></div><div class="p-3 text-span">{{getContent(item2.text)}}</div></div><text class="mt-1 text-pretty leading-3 text-span" v-else>{{item2.text}}</text></keep-alive></div></div></div><!--发送请求框--><div class="mt-md-2 w-full d-flex justify-center"><div class="content-foot bg-base-300"><div class="input-texture"><el-inputv-model="form.content"maxlength="2000"class="el-input-text":clearable="true":autosize="{ minRows: 2, maxRows: 5 }"type="textarea"placeholder="在此输入你想了解的内容"/></div><div class="foot-btn"><div></div><div><el-button style="height: 40px;" @click="sendSocket()" class=" bg-primary border-0 w-20 h-12">发送</el-button></div></div></div></div></div><div v-if="loginShow"><login-page @receive-login="receiveLogin"></login-page></div>
</div>
</div>
</template>

 3.js 代码  部分代码不能直接用,我把页面源码全部放上来了,你按照自己的需求分析提取相关内容,主要是socket的连接功能,你主要看这个,socket 的连接地址是ws://localhost:8082/websocket/+`{uuid}`

<script setup>
import { onBeforeUnmount, onMounted, ref } from 'vue'
import {addSparkChat,deleteSparkChat,queryAllLargeMode,querySparkChat,updateSparkChat
} from '../interface/sparkApi.js'
import { getSelUserInfo, getVerifyUser } from '../interface/UserApi.js'
import { configuration } from '../../env.product.js'
import { ElMessage } from 'element-plus'
import LoginPage from '../components/loginPage.vue'
let socket = null;
const modelType =ref(true);
const userInfo = ref();
const deleteIndex =ref(-1);
const form =ref({content:null,userId:null,type:"spark",historyId:null,chatType:null,
});
const historyList = ref([]);
const assistantList = ref([]);
const selectChat = ref({modelKey:"",list:[],title:""
});
const sparkList = ref([]);
const sparkEdit = ref(false);
const loginShow = ref(false);onMounted(()=>{sparkList.value.push({content:[{text: "我是你的AI智能助手,请问我有什么能帮到您?",title: null,type: false,}],type:"back"})verifyUser();
})/*** 回话记录删除鼠标移入移除事件*/
function deleteIndexFun(val,index){deleteIndex.value=-1;if (val){deleteIndex.value=index}
}
/*** 复制代码* @param val*/
function copyContentFun(val){const el = document.createElement('textarea');el.value = getContent(val);document.body.appendChild(el);el.select();document.execCommand('copy');document.body.removeChild(el);ElMessage({message: '复制成功',type: 'success',plain: true,})
}/*** 返回首个拼音或者字* @param s* @return {*|null}*/
function returnFirst(s) {const pattern = /```(\w+)/;const matches = s.match(pattern);return matches ? matches[1] : null;
}
/*** 返回正文内容* @param item* @return {*}*/
function getContent(item) {let title = returnFirst(item);let result = (item.replace(/```/g, "\n")).replace(title,"") || item;return result;
}/*** 进入页面连接webSocket*/function openSocket() {const socketUrl = configuration.ws + userInfo.value.userId;if (socket != null) {socket.close()socket = null}//创建socketsocket = new WebSocket(socketUrl)//打开事件socket.onopen = function () {//	console.log("websocket已打开");}//监听服务器返回的数据信息socket.onmessage = msg => {let lastIndex = (sparkList.value).length - 1;let lastContentIndex = sparkList.value[lastIndex].content.length - 1;if (msg.data.indexOf("``") !== -1) {if (sparkEdit.value){let oldValue = sparkList.value[lastIndex].content[lastContentIndex>=0?lastContentIndex:0].text;sparkList.value[lastIndex].content[lastContentIndex>=0?lastContentIndex:0].text=oldValue+""+msg.data}else {sparkList.value[lastIndex].content.push({text: msg.data,title: null,type: true,})}sparkEdit.value = ! sparkEdit.value;}else {if (sparkEdit.value){let oldValue = sparkList.value[lastIndex].content[lastContentIndex>=0?lastContentIndex:0].text;sparkList.value[lastIndex].content[lastContentIndex>=0?lastContentIndex:0].text=oldValue+""+msg.data}else {sparkList.value[lastIndex].content.push({text: msg.data,type: false,})}}}//关闭事件socket.onclose = function () {addSparkChatFun();// console.log("websocket已关闭");}//发生了错误事件socket.onerror = function () {//	console.log('websocket发生了错误')closeSocket()}
}
/*** 关闭socket*/
function closeSocket() {if (socket !== null) {socket.close()socket = null}
}/*** 发送socket信息*/
function sendSocket() {sparkEdit.value = false;if (socket !== null) {let list = sparkList.value;let model ={content:{text:form.value.content,type:false},type:"send"};let model2 ={content:[],type:"back"};sparkList.value=[...list,model,model2];socket.send(JSON.stringify(form.value));form.value.content = null;setTimeout(()=>{addSparkChatFun();},5000)}
}/*** 选中历史对话数据*/
function selectItemFun(item){selectChat.value = item;sparkList.value = JSON.parse(item.list);
}/*** 新增/修改会话记录*/
function addSparkChatFun(){if (sparkList.value.length>=1){sparkList.value.shift();selectChat.value.title=sparkList.value[0].content.text;selectChat.value.list=JSON.stringify(sparkList.value);if (selectChat.value.id==null){addSparkChat(selectChat.value).then(res=>{if (res.code===200){selectChat.value.id=res.data;querySparkChatFun();}})}else {updateSparkChat(selectChat.value);querySparkChatFun();}}
}/*** 删除会话记录*/
function deleteSparkChatFun(val){deleteSparkChat(val).then(res=>{querySparkChatFun();ElMessage({message: res.msg,type: res.code==200?'success' :'error',plain: true,})})
}/*** 校验用户是否已经登录*/
function verifyUser() {getVerifyUser().then((res) => {if (res.code === 200) {localStorage.setItem('token', res.data)new selUserInfoFun()} else {loginShow.value = true;}})
}/*** 接收登录状态*/
function receiveLogin(e) {selUserInfoFun();
}/*** 查询用户信息* @constructor*/
function selUserInfoFun() {getSelUserInfo().then((res) => {if (res.code === 200) {userInfo.value = res.data;form.value.userId=res.data.userId;querySparkChatFun();queryAllLargeModeFun();openSocket();loginShow.value = false;}else {loginShow.value = true;}})
}
/*** 查询用户历史记录*/
function querySparkChatFun(){querySparkChat({}).then(res=>{if(res.code === 200){historyList.value=res.data;}})
}
/*** 查询模型分类*/
function queryAllLargeModeFun(){queryAllLargeMode({}).then(res=>{if(res.code === 200){form.value.chatType=res.data[0]?.modelKey || null;selectChat.value.modelKey=res.data[0]?.modelKey || null;assistantList.value=res.data;}})
}/*** 切换历史/模型分类* @param type*/
function modelTypeFun(type){modelType.value=type;
}
/*** 页面销毁之前*/
onBeforeUnmount(() => {closeSocket();
})
</script>

4.css

<style scoped>
.content-container {height: calc(100vh - 74px);width: 100%;display: flex;padding: 4px 0 4px 0;
}.side{width: 260px;height: 100%;}.content{width: calc(100% - 310px);height: 100%;display: flex;flex-direction: column;align-items: center;user-select: text;}.content-body{width: 100%;flex: 1;overflow-y: scroll;display: flex;align-items: center;flex-direction: column;}.item-content{width: 85%;}.content-foot{width: 85%;min-height: 120px;max-height: 300px;border-radius: 15px;display: flex;align-items: center;flex-direction: column;padding: 5px 0 5px 0;}.input-texture{width: 98%;height: auto;}.foot-btn{height: 40px;width: 98%;display: flex;justify-content: space-between;align-items: center;}:deep(.el-textarea__inner) {outline: none;border: none;resize: none;box-shadow: none;background:transparent;font-size: large;}.side-logo{width: 100%;height:100px;padding: 0 20px 0 20px;}.side-api{width: 100%;height:50px;padding: 0 20px 0 20px;justify-content: space-between;}.side-talke{width: 100%;height:50px;padding: 0 20px 0 20px;}.talke{width: 100%;height: 40px;border-radius: 6px;}
.side-history{width: 100%;height:50px;justify-content: space-evenly;
}
.side-content{width: 100%;height: calc(100% - 300px);
}
.side-foot{width: 100%;height:50px;
}
.text-span{white-space: pre-wrap;
}
</style>

 备注:样式你不用安装也可以,你根据自己需求重新也可以

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

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

相关文章

SAP MIGO 050 BADI:字段 GOITEM-XXXXX 未准备好输出

背景&#xff1a; MIGO过账时候需要根据某些条件更改某些字段的值&#xff0c;当要改的字段在前台不显示时&#xff0c;通过MB_MIGO_BADI~LINE_MODIFY去更改时&#xff0c;则会出现以下报错&#xff1a;MIGO050 解决方案1&#xff1a; 通过配置将该字段配置显示出来即可&…

电影美学复古胶片特效视频转场模板 | Premiere Pro 项目工程文件

这个Premiere Pro项目工程文件是一个电影美学胶片特效视频转场模板&#xff0c;每个过渡效果都散发出一种有机的怀旧魅力&#xff0c;让人回忆起经典电影卷轴和模拟摄影的独特美感。 项目特点&#xff1a; 胶片烧伤过渡效果&#xff1a;包括从微妙的闪烁到大胆的爆发&#xff…

学习总结报告模板

学习总结报告模板1 --年10月15日进入--公司至今已近两周时间&#xff0c;通过这段时间的工作和学习&#xff0c;已经适应了新的工作环境&#xff0c;了解了公司的发展历史及企业文化、认清了公司的组织结构及配置&#xff0c;熟识了大部分的同事&#xff0c;掌握了公司的大部分…

南充文化旅游职业学院领导一行莅临泰迪智能科技参观交流

6月18日&#xff0c;南充文化旅游职业学院旅游系副书记刘周、教务处教学运行与质量保障科科长及智慧旅游技术应用专业教研室主任李月娴、大数据技术专业负责人 龙群才、大数据技术专业专任教师 李昱洁莅临泰迪智能科技产教融合实训中心参观交流。泰迪智能科技董事长张良均、副总…

两种单例模式(保证线程安全)

开始前&#xff0c;球球各位读者给个三连吧&#xff0c;有错误感谢指出&#xff0c;谢谢 单例模式也叫单个实例&#xff0c;也就是这个类只有且只能有一个实例对象&#xff0c;这样一个类就叫做“单例”&#xff1b;单例模式有很多种&#xff0c;这里只介绍“饿汉模式”和“懒…

【Java】已解决Java中的java.util.NoSuchElementException异常

文章目录 一、分析问题背景二、可能出错的原因三、错误代码示例四、正确代码示例五、注意事项 已解决Java中的java.util.NoSuchElementException异常 一、分析问题背景 java.util.NoSuchElementException是Java中常见的运行时异常&#xff0c;它通常发生在使用迭代器&#xf…

swagger下载文件名中文乱码、swagger导出文件名乱码、swagger文件导出名称乱码、解决swagger中文下载乱码bug

文章目录 一、场景描述&#xff1a;swagger导出文件名称乱码二、乱码原因三、解决方法3.1、方法一、在浏览器中输入地址下载3.2、方法二、swagger升级为2.10.0及以上 四、可能遇到的问题4.1、DocumentationPluginsManager.java:152 一、场景描述&#xff1a;swagger导出文件名称…

springboot与flowable(7):流程变量

一、启动时添加流程变量 拿第一个流程图举例&#xff0c;创建一个新的流程定义。 Testvoid contextLoads() {DeploymentBuilder deployment repositoryService.createDeployment();deployment.addClasspathResource("process01/FirstFlow.bpmn20.xml");deployment.…

android | MemoryLeakMonitor.jar is not exist! 目前还是存在这个问题,好像解决不到

2024了&#xff0c;用的华为的老机子 navo3 真机测试&#xff0c;目前还是这个渲染问题&#xff1a;滑动验证页面 MemoryLeakMonitor.jar is not exist! Software rendering doesnt support hardware bitmaps gpu的渲染问题&#xff1a; 这条信息“Software rendering doesnt…

动态规划-简单多状态dp问题 -- 删除并获得点数

动态规划-简单多状态dp问题 – 删除并获得点数 文章目录 动态规划-简单多状态dp问题 -- 删除并获得点数题目重现读懂题目算法流程示例代码 题目重现 题目链接&#xff1a;删除并获得点数 - 力扣 给你一个整数数组 nums &#xff0c;你可以对它进行一些操作。 每次操作中&#…

用画图,将2张图片,合并成 一张图片 + 压缩体积

合并 第一步&#xff1a;选中要做比较的两张图片其中一张&#xff0c;单击鼠标右键&#xff0c;选择“打开方式--画图”。 第二步&#xff1a;如果图片过大&#xff0c;占据了整个屏幕不好观察&#xff0c;用右下角的标尺&#xff0c;缩小视图 第三步&#xff1a;鼠标左键按住…

HTTP学习记录(基于菜鸟教程)

文章目录 1.简介1.1常用的HTTP方法1.2Http版本1.3注意事项 2.Https3.Http消息结构3.1客户端请求消息3.2响应消息 4.常见的响应头5.HTTP状态码6.Http content-type在这里插入图片描述 7.MIME类型8.HTTP2 1.简介 Http&#xff0c;被称为超文本传输协议&#xff0c;HyperText Tran…

训练营第四十二天| 583. 两个字符串的删除操作72. 编辑距离647. 回文子串516.最长回文子序列

583. 两个字符串的删除操作 力扣题目链接(opens new window) 给定两个单词 word1 和 word2&#xff0c;找到使得 word1 和 word2 相同所需的最小步数&#xff0c;每步可以删除任意一个字符串中的一个字符。 示例&#xff1a; 输入: "sea", "eat"输出: …

使用fetch加载阿里云的在线json 出现403错误

在做地图项目的时候&#xff0c;引用了阿里云的在线JSON地图数据。 问题描述&#xff1a; 但是本地开发使用fetch请求json地址的时候接口却出现了403错误&#xff0c;把地址直接复制到浏览器上却能正常打开。 https://geo.datav.aliyun.com/areas_v3/bound/330000_full.json …

06-操作元素

在前面的文章中重点介绍了一些元素的定位方法&#xff0c;定位到元素后&#xff0c;就需要操作元素了。本篇通过简单案例来介绍app应用中的一些常用操作。 一、案例介绍 下面列表中有四个字典&#xff0c;每个字典中的num1代表第一个操作数&#xff0c;num2代表第二个操作数&a…

力扣 面试题17.04.消失的数字

数组nums包含从0到n的所有整数&#xff0c;但其中缺了一个。请编写代码找出那个缺失的整数。你有办法在O(n)时间内完成吗&#xff1f; 示例 1&#xff1a; 输入&#xff1a;[3,0,1] 输出&#xff1a;2 示例 2&#xff1a; 输入&#xff1a;[9,6,4,2,3,5,7,0,1] 输出&#x…

GIT----使用技巧之保存现场回退新建分支继续开发

GIT----使用技巧之保存现场回退新建分支继续开发 前言&#xff1a; 故事是这样的&#xff0c;有一个比较复杂的项目使用的是STM32F103VCT6&#xff08;资源flash-256k,RAM-48k&#xff09;,开发到一半发现RAM不够用了&#xff0c;换容量更大的芯片STM32F103VGT6&#xff08;资源…

再谈量化策略失效的问题

数量技术宅团队在CSDN学院推出了量化投资系列课程 欢迎有兴趣系统学习量化投资的同学&#xff0c;点击下方链接报名&#xff1a; 量化投资速成营&#xff08;入门课程&#xff09; Python股票量化投资 Python期货量化投资 Python数字货币量化投资 C语言CTP期货交易系统开…

【qt5生成软件-can卡-上位机-无法加载ControlCAN.dll错误代码(0xc0150002)等相关问题-WIN11系统-尝试解决】

【qt5生成软件-无法加载ControlCAN.dll&错误代码0xc0150002&#xff1a;-等相关问题-WIN11系统-尝试解决-总结整理】 1.前言2.环境说明3.问题说明4.尝试方法总结&#xff08;1&#xff09;更新支持包c库&#xff08;2&#xff09;更新USB相关驱动&#xff08;3&#xff09;…

Sqlite3数据库基本使用

一、基本概念 数据&#xff1a;能够输入计算机并能被计算机程序识别和处理的信息集合 数据库&#xff1a;长期存储在计算机内、有组织的、可共享的大量数据的集合 DBMS&#xff1a;位于用户与操作系统之间的一层数据管理软件&#xff0c;用于操纵和管理数据库 二、安装 在线…