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

相关推荐
杨超越luckly10 小时前
HTML应用指南:利用GET请求获取全国中国建设银行网点位置信息
前端·arcgis·html·数据可视化·门店数据
王翼鹏10 小时前
html 全角空格和半角空格
前端·html
敲代码的嘎仔10 小时前
JavaWeb零基础学习Day2——JS & Vue
java·开发语言·前端·javascript·数据结构·学习·算法
CsharpDev-奶豆哥10 小时前
jq获取html字符串中的图片逐个修改并覆盖原html的解决方案
前端·html
IT_陈寒11 小时前
Python性能优化:用这5个鲜为人知的内置函数让你的代码提速50%
前端·人工智能·后端
简小瑞11 小时前
VSCode源码解密:一行代码解决内存泄漏难题
前端·设计模式·visual studio code
邢行行11 小时前
Node.js 核心模块与模块化笔记
前端
Asort11 小时前
JavaScript设计模式(九)——装饰器模式 (Decorator)
前端·javascript·设计模式
Man11 小时前
🔥 Vue3 动态 ref 黑科技:一招解决 v-for 中的组件引用难题!
前端·vue.js
Amy_au11 小时前
AWS Lambda 学习笔
学习·云计算·aws