vue前后端交互学习问题记录2

1.在使用定时任务时报如下错误:No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration.

看报错是ThreadContext未绑定SecurityManager,在定时任务最开始的代码前加上:

DefaultWebSecurityManager manager = new DefaultWebSecurityManager();

ThreadContext.bind(manager);

重新启动项目,定时任务正常运行。

2.在使用element UI 的时间选择器的时候,由于时间是一个数组,当选中时间查询后又删除时间查询,该时间会被置为null,会报时间为null的错误,如图:

此时,可以在export default里加上监听器,只要时间一为null就将其置为\[\],就能解决了,如图所示:

其中"dataForm.creatTime"所在的位置是要监听的变量,newVal为该变量的新值,一旦newVal为null就将要监听的变量置为你想要的值。

immediate为立即处理,通常为false,置为true进入页面会自动触发。

deep为深度监听,对象和数组都是复杂数据类型,复杂数据类型存的是地址值,地址没有变,不会触发watch。这时我们需要进行深度监听,就需要加上一个属性 deep,值设为 true,使用deep属性可以监测到整个对象所有属性值的变化,某个属性发生变化,watch都会触发监听该对象。

3.编译时,idea突然报如下错:Blocked mirror for repositories: public (http://maven.aliyun.com/nexus/content/groups/public/, default, releases+snapshots) Since Maven 3.8.1 http repositories are blocked. Possible solutions: - Check that Maven pom files not contain http repository http://maven.aliyun.com/nexus/content/groups/public/ - Add a mirror(s) for http://maven.aliyun.com/nexus/content/groups/public/ that allows http url in the Maven settings.xml - Downgrade Maven to version before 3.8.1 in settings

解决:

将pom.xml的所有将镜像仓库从http 变成https

比如我引入的http://maven.aliyun.com/nexus/content/groups/public将期修改为
https://maven.aliyun.com/nexus/content/groups/public重新刷新配置后就能正常使用了

4.vue的时间选择器校验老是不生效

检查之后发现原来是由于我没加"prop",系统无法识别校验规则中的名称,加上之后就可以

相关推荐
慧都小项7 分钟前
从 Figma 到 Qt:Qtitan 能减少哪些界面还原工作?
前端·qt·嵌入式·figma·图形界面·工业界面·qtitan
YWL11 分钟前
OpenLayers导出功能:地图截图+GeoJSON导出完整方案,从Canvas合并到PDF生成
前端·vue·openlayers
z23456d12 分钟前
第三十九天学习心得
学习
苦瓜小生19 分钟前
【前端】【力扣与手撕】十天带你刷完前端算法与手撕,全是最简单好记的最优解法!day4
前端·数据结构·算法·leetcode·面试
水巷石子23 分钟前
学习langChain4j的第二天,体验springBoot中的starter
java·spring boot·学习·spring·langchain4j
mayaairi28 分钟前
Vue2 实战进阶:表单数据收集、指令系统与自定义指令全解析
前端·javascript·vue.js
程序员梅雨35 分钟前
微服务学习最终篇: Elasticsearch
学习·elasticsearch·微服务
计算机魔术师38 分钟前
实测GPT-6 Astra后,我发现过去十年的专业门槛正在失效
前端
虎头金猫41 分钟前
Pic Smaller 本地部署:压缩图片、转换格式,再搭建自己的 Web 工具
运维·前端·开源·aigc·ai编程·ai写作
hunterandroid42 分钟前
Android ANR 排查实战:从线上告警到主线程卡点定位
android·前端