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

  • 18
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值