![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
errors
qq_31387691
我是中国人
展开
-
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0
1.当前模块的test包下的某个test类没有test方法,可以加上@Ignore注解2.在当前模块<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <ve原创 2021-09-07 16:04:34 · 793 阅读 · 0 评论 -
管网的资源如Elasticsearch下载慢怎么办?
0)场景Elasticsearch下载的时候特别慢,有个时候下载其他的特别慢也可以这么解决(例如:Eclipse等等)11)解决办法举例(下载Elasticsearch)a)安装Motrix,地址https://motrix.app/zh-CN/b)打开如下网址(Elasticsearch所有版本下载地址)https://www.elastic.co/cn/downloads/past-releases#elasticsearchc) 选择一个版本,例如我要下载7.7.1,然后按.转载 2020-08-17 10:06:13 · 435 阅读 · 0 评论 -
使用Cerebro管理es集群报错 Unexpected response status: [503
es查询发现MasterNotDiscoveredException,es集群选举不成功?在elasticsearch.yml中添加配置# 表示该节点会不会作为主节点,true表示会;false表示不会node.master: true在每个节点中 都添加此配置 问题解决...原创 2020-08-13 10:31:59 · 2494 阅读 · 1 评论 -
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
elasticsearch启动时遇到的错误问题翻译过来就是:elasticsearch用户拥有的内存权限太小,至少需要262144;解决:切换到root用户执行命令:sysctl -w vm.max_map_count=262144查看结果:sysctl -a|grep vm.max_map_count显示:vm.max_map_count = 262144上述方法修改之后,如果重启虚拟机将失效,所以:解决办法:在 /etc/sysctl.co...原创 2020-08-10 17:09:28 · 246 阅读 · 0 评论 -
Spring yml文件配置默认值
Spring环境中设置属性值的途径之一是通过@Value,而@Value可以通过:default设置默认值,如${swagger.host:8080},通用yml也可以通过与@Value的方式设定默认值。没有设定server.port默认值:设定server.port默认值:...原创 2020-08-10 16:14:29 · 1603 阅读 · 0 评论 -
Date与时间戳的相互转换
1、Date对象转换为时间戳Date date = new Date(); long times = date.getTime(); System.out.println(times); 效果如下:15088242832922、时间戳转换为Date日期对象long times = System.currentTimeMillis(); Date date = new Date(times); System.out.println(date); ...原创 2020-08-10 14:47:40 · 17552 阅读 · 0 评论 -
springboot项目 JSONObject jsonOne = new JSONObject(); jsonOne.put(“createTime“,time返回给前端的时间是long类型的时间戳
public String testJson(){ Date createTime = new Date(); JSONObject jsonOne = new JSONObject(); jsonOne.put("createTime",time); String jsonString = JSONObject.toJSONString(jsonOne); retuen jsonString;}向前台传递json串时 前台接收到的time被转化成了long类型的时间戳问题出现...原创 2020-08-10 14:40:13 · 658 阅读 · 0 评论 -
java实现两个JSON串合并
package com.toltech.springboot;import com.alibaba.fastjson.JSONObject;import org.junit.Test;public class jsonTest { @Test public void josn(){ JSONObject jsonOne = new JSONObject(); JSONObject jsonTwo = new JSONObject(); .原创 2020-08-10 11:09:00 · 2263 阅读 · 0 评论 -
使用Spring jpa时 在Entity类中column注解name属性失效问题
项目使用spring boot构建。开发的过程中遇到Spring Data JPA @Column 注解无效。需要在application.yml中配合策略spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl原创 2020-08-06 12:23:34 · 445 阅读 · 0 评论 -
springboot 整合mybatis 报错Invalid bound statement (not found)
springboot 整合mybatis后 报错Invalid bound statement (not found) 报错提示很明显(无效的绑定语句 找不到dao接口对应的xxxMapper.xml)可能的原因:1、xxxmapper.xml中的namespace未正确配置1.1、未在dao接口上添加@mapper注解 或者在springboot启动类上未添加包扫描的@mapperscan()注解2.1、xxxmapper.xml放到了java目录里面。*例如下图:这样会出现一个.原创 2020-08-06 09:19:51 · 1221 阅读 · 2 评论 -
数据库保存的时间与获取到的时间不一致问题
今天开发时遇到一个问题,具体如下:数据库储存的时间与程序实际查询获取到的时间不一致,其他都正常。解决办法:在实体类的时间属性上加上如下注解:@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 问题解决!!!扩展:@JsonFormat 有两种使用用法:在对象属性上,或者在属性的 getter 方法上 因为我们是东八区(北京时间)。所以我们在格式化的时候要指定时区(imezone = "GMT+8")原创 2020-08-05 13:44:43 · 1730 阅读 · 0 评论 -
Mysql中max函数取得的值不是最大
①问题:遇到一个很有意思的问题,这里记录一下, 就是在使用max函数的时候发现取得的最大值其实不是最大值. 比如: 某一列中有10000000,和9999999, 其最大值应该是10000000但是查到的值是9999999,②原因:因为字符串类型大小比较是先比较首字符,然后依次往后进行比较③解决方案:max(id+0)...原创 2020-08-04 13:52:40 · 791 阅读 · 0 评论 -
windows VC++环境和.net环境异常
1、启动【mysql】服务时出现异常:【vcruntime140.dll缺失】或【vcruntime140_1.dll缺失】或【api-ms-win-crt-runtime-l1-1-0.dll丢失】解决办法:(1)安装【缺少VCRUNTIME140.dll升级补丁--> VC_redist.x64.exe】,若安装该补丁失败,查看①;① 若安装VC_redist.x64.exe时失败,提示【设置失败】则进入【windows安装VC2015所需补丁->双击运行Windows6.1-K原创 2020-07-28 12:51:24 · 585 阅读 · 0 评论 -
安装Microsoft .NET Framework 4.6.2脱机包
我在官网下载了“适用于 Windows 7 SP1、Windows 8.1、Windows Server 2008 R2 SP1、Windows Server 2012 和 Windows Server 2012 R2 的 Microsoft .NET Framework 4.6.2(脱机安装程序)”可在安装Microsoft .NET Framework 4.6.2脱机包时提示,无法建立到信任根颁发机构的证书链 Microsoft .NET Framework 4.6.2(脱机安装程序),电脑原创 2020-07-28 11:38:03 · 2907 阅读 · 0 评论 -
java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotationUtils.isInJavaLangAnnotat
在向资源服务器中添加oauth2及相关配置后 系统启动报错查看错误信息org.springframework.core中的NoSuchMethod 异常 大概率是pom文件中导入的jar包冲突官方提供了管理Spring Cloud 个个版本兼容的pom<dependencyManagement> <dependencies> <dependency> <groupId>org.springfr.原创 2020-07-22 16:08:33 · 396 阅读 · 0 评论 -
Error creating bean with name ‘jwtAccessTokenConverter‘ defined in class path resource
在向资源服务器添加 ResourceServerConfig extends ResourceServerConfigurerAdapter ( tokenStore和jwtAccessTokenConverterjwt加解密工具时 )报错:Caused by: Error creating bean with name 'jwtAccessTokenConverter' defined in class path resourceCaused by: java.lang.NullPoint原创 2020-07-22 15:46:45 · 2180 阅读 · 0 评论 -
To display the conditions report re-run your application with ‘debug‘ enable
启动spring boot报错: To display the conditions report re-run your application with 'debug' enable端口被占用了 修改 server.port= 31001解决原创 2020-07-22 16:15:33 · 1258 阅读 · 0 评论