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",系统无法识别校验规则中的名称,加上之后就可以

相关推荐
hssfscv4 分钟前
Javaweb 学习笔记——html+css
前端·笔记·学习
Mr.Jessy11 分钟前
JavaScript高级:深浅拷贝、异常处理、防抖及节流
开发语言·前端·javascript·学习
唐叔在学习17 分钟前
30s让ai编写「跳过外链中转页」的油猴脚本
前端·javascript
酸菜土狗27 分钟前
🔥 纯 JS 实现 SQL 字段智能解析工具类,前端也能玩转 SQL 解析
前端
wo不是黄蓉28 分钟前
脚手架步骤流程
前端
我这一生如履薄冰~41 分钟前
css属性pointer-events: none
前端·css
博客胡44 分钟前
Python-fastAPI的学习与使用
学习·fastapi·ai编程
brzhang1 小时前
A2UI:但 Google 把它写成协议后,模型和交互的最后一公里被彻底补全
前端·后端·架构
HyperAI超神经1 小时前
【Triton 教程】triton_language.load
人工智能·学习·大语言模型·cpu·gpu·编程语言·triton
coderHing[专注前端]1 小时前
告别 try/catch 地狱:用三元组重新定义 JavaScript 错误处理
开发语言·前端·javascript·react.js·前端框架·ecmascript