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

相关推荐
爱学习的程序媛5 分钟前
【Web前端】JavaScript设计模式全解析
前端·javascript·设计模式·web
小码哥_常15 分钟前
从SharedPreferences到DataStore:Android存储进化之路
前端
老黑23 分钟前
开源工具 AIDA:给 AI 辅助开发加一个数据采集层,让 AI 从错误中自动学习(Glama 3A 认证)
前端·react.js·ai·nodejs·cursor·vibe coding·claude code
薛先生_09929 分钟前
js学习语法第一天
开发语言·javascript·学习
jessecyj38 分钟前
Spring boot整合quartz方法
java·前端·spring boot
苦瓜小生1 小时前
【前端】|【js手撕】经典高频面试题:手写实现function.call、apply、bind
java·前端·javascript
天若有情6731 小时前
前端HTML精讲03:页面性能优化+懒加载,搞定首屏加速
前端·性能优化·html
踩着两条虫1 小时前
AI驱动的Vue3应用开发平台深入探究(十):物料系统之内置组件库
android·前端·vue.js·人工智能·低代码·系统架构·rxjava
swipe2 小时前
AI 应用里的 Memory,不是“保存聊天记录”,而是管理上下文预算
前端·llm·agent
慧一居士2 小时前
nuxt3 项目和nuxt4 项目区别和对比
前端·vue.js