后台的值传到前端发生变化
传个对象到前端,对象中的groups的值是0,这是debug时的截图 这是前端js 是的没错,我写的前端js里面把"==“写成了”=",但是它没有报错,进行了赋值 然后我进行了测试
var a=1
console.log(a);
if(a=1){
console.log("a的值是1" a);
}else if(a=2){
console.log("a的值是2" a);
}
不停地改变a的值,最终输出结果截图 a为1时 a为2时 a为3,4,5,6,7时 a的值都成了1
qaq我还以为闹鬼了qaq 原理:if的条件是逻辑表达式,只看最终结果是真是假,不看里面的操作具体是什么 给a值赋值的操作一直成功,所以一直执行第一个语句.。。。
‘dependencies.dependency.(groupid:artifactid:type:classifier)’ must be unique: org.apache.poi:poi:jar -> duplicate declaration of version ${poi.version} @ line 203, column 15
对maven项目进行clean时,我的报错是:
[info] scanning for projects… [warning] [warning] some problems were encountered while building the effective model for com.zle:uav:jar:1.0.0-snapshot [warning] ‘dependencies.dependency.(groupid:artifactid:type:classifier)’ must be unique: org.apache.poi:poi:jar -> duplicate declaration of version ${poi.version} @ line 203, column 15 [warning] [warning] it is highly recommended to fix these problems because they threaten the stability of your build. [warning] [warning] for this reason, future maven versions might no longer support building such malformed projects. [warning] 我们可以看到dependencies.dependency.(groupid:artifactid表示提示地点在pom文件的dependencies中的dependency里,groupid:artifactid:type:classifier必须是唯一的:后面提示org.apache.poi:poi:jar,则我们全局搜索org.apache.poi,我在我的pom文件中搜索到了两个org.apache.poi 删除其中一个,就好了 再clean就不报错了
idea连接mysql数据库,以及解决连接途中的报错
如下图所示,点击边框的database > >data source > mysql(下图所示) 初次配置的时候可能没有驱动,点击下载就好了(下图所示) 下载完驱动在name哪里可以写数据库别名,host默认,填入数据库的用户名和密码,需要修改端口的话手动修改,我的是默认值3306,url默认(下图所示),然后点击"test cinnection"进行测试连接
测试连接不报错的话可以跳过这一步直接apply就可以了,这个报错是时区问题,点击"set time zone"进行设置,或者点击"advanced"中的"servertimezone"进行设置 设置"servertimezone"为"gmt"或 “asia/shanghai”,也可以在url后添加"?servertimezone=gmt" 设置完成之后,连接就成功了(如下图所示),连接之后没有找到我的数据库,点击箭头所指处进行设置 点击"schemas",将自己的数据库打上对勾,我的数据库名是uav,然后就可以啦 然后我们就可以找到自己的数据库了
时区报错解决方法来源https://www.cnblogs.com/cnsdhzzl/p/13563648.html
也可以通过cmd命令行解决时区问题https://www.freesion.com/article/903811648/
还没有评论,来说两句吧...