- 博客(1077)
- 资源 (5)
- 收藏
- 关注
原创 spring读取resources文件夹下的文件报错:cannot be resolved to absolute file path because it dose not reside in th
在做一个项目的上传功能的时候,需要提供上传文件的模板下载功能,后端的实现方式是:将模板文件放在resources文件夹下,然后提供一个接口,接口中读取resources文件夹下的模板文件,并通过文件流写出给浏览器。但是,恰恰就是因为这个问题,导致了文件无法读取到。因为我们是以jar包的方式部署的项目,模板文件被打到了jar包里,这个api是无法将jar包中的文件直接读取出来的,所以才会出现标题中提到的这个问题。因为自己也,没遇到过这个问题,所以遇到问题,第一步就百度,百度完,知道原因所在了。
2024-11-19 11:37:24
900
原创 通达信涨停板选股公式
(5)红三兵: BACKSET(REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND CLOSE>OPEN AND (CLOSE-OPEN)>=REF((CLOSE-OPEN),1) AND REF((CLOSE-OPEN),1)>= REF((CLOSE-OPEN),2) AND OPEN>REF(OPEN,1) AND REF(OPEN,1)>REF(OPEN,2),3);
2024-07-22 22:27:17
7228
原创 解决Navicat12无法连接mysql8.4数据库:Authentication plugin ‘caching_sha2_password‘ cannot be loaded
报错问题:"navicat连接mysql 8.4 authentication plugin 'cache'" 指的是在使用Navicat连接MySQL 8.4版本数据库时,遇到了身份验证插件的缓存问题。MySQL 8.0引入了新的身份验证插件'caching_sha2_password',它是默认的身份验证机制。navicat连接mysql8.4 authentication plugin cache。升级Navicat:使用navicat15就可以连接了。在服务器端使用命令修改用户密码是不可以的。
2024-07-11 17:39:12
551
原创 解决Navicat12中2059 - Authentication plugin ‘caching sha2 password‘ cannot be loaded: 的问题
2.将navicat12升级成navicat15就不会报错了,我使用的这个办法,因为mysql数据库服务器的高级权限拿不到。navicat12连接mysql8时会报错。1.mysql服务器设置。
2024-01-29 18:29:53
547
原创 Nacos 启动失败 Failed to instantiate [com.alibaba.nacos.core.c luster.ServerMemberManager]: Constructor
nacos启动报错
2023-12-28 13:40:59
2598
1
原创 Springboot2.6+Swagger2无法扫描到接口:No operations defined in spec!
nested exception…// .paths(PathSelectors.any()) //这会把所有路径都给过滤了!多模块环境下,swaggerConfig配在公共模块,发现部分模块无法扫描到Controller接口。.enable(true) //是否启用swagger。.version("版本号:" + "1.0")// 扫描所有有注解的api,用这种方式更灵活。// 设置哪些接口暴露给Swagger展示。// 用ApiInfoBuilder进行定制。
2023-07-05 18:50:14
2739
1
原创 java 解压rar压缩包
这个示例代码通过解析RAR文件的文件头来提取压缩包中的文件。在解压过程中,他们将提取的内容写入到目标目录中的新文件中。要使用此示例代码,你需要先将Apache Commons Compress库添加到你的Java项目的类路径中。Java本身不提供解压RAR压缩包的功能,需要借助第三方库来实现。记录下引入maven的相关坐标后,在archivers包下没有找到rar包。
2023-06-29 09:05:17
3680
3
转载 【Nginx】./configure: error: the HTTP gzip module requires the zlib library. You can either
中我们执行“./configure” 会提示 error: the HTTP gzip module requires the zlib library意思是告诉我们没有zlib library的支持了 碰到此类问题我们只要安装这个库就可以了。
2023-06-01 17:23:52
4871
原创 nginx模块stream配置
例如,mysql账户一般将源地址限制为APP应用服务器,而nginx可能同时是web APP应用服务器。此时,通过在nginx中进行流传送,可以实现从开发终端向mysql的访问。流模块支持负载平衡算法,如轮询、最小连接数和ip_hash,从而实现数据流负载平衡。stream模块一般用于tcp/UDP数据流的代理和负载均衡,可以通过stream模块代理转发TCP消息。也就是说,必须在使用./configure --with-stream编译时添加流模块。流模块的使用方法与http模块相同,语法也基本相同。
2023-05-29 18:03:16
9298
转载 python3中超级好用的日志模块-loguru模块详解
用了 loguru 我们还可以非常方便地使用 rotation 配置,比如我们想一天输出一个日志文件,或者文件太大了自动分隔日志文件,我们可以直接使用 add 方法的 rotation 参数进行配置。loguru默认的输出格式是上面的内容,有时间、级别、模块名、行号以及日志信息,不需要手动创建 logger,直接使用即可,另外其输出还是彩色的,看起来会更加友好。所以说,刚才我们所演示的输出到文件,仅仅给它传了一个 str 字符串路径,他就给我们创建了一个日志文件,就是这个原理。
2023-05-27 16:30:36
545
原创 MybatisPlus报错:BindingException: Invalid bound statement (not found): com...XxxMapper.insert
mybatisplus BindingException Invalid bound statement (not found)
2022-11-08 11:39:32
1924
原创 ArrayList c.toArray might (incorrectly) not return Object[] (see 6260652)
arraylist
2022-07-23 10:31:35
526
原创 Spring框架实体bean转json返回前端报错:Null key for a Map not allowed in JSON (use a converting NullKeySerializer
jackson
2022-06-15 18:17:04
1871
转载 org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unrecognized t
spring的controller接口@RequestBody传入form表单报以下错误:org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unrecognized token 'cpId': was expecting ('true', 'false' or 'null'); nested exception is com.fasterxml.jackson.core.Json.
2022-05-24 14:30:50
10150
原创 ‘gbk‘ codec can‘t decode byte 0x80 in position 2: illegal multibyte sequence
在脚本上读取一个文本文件但是报错了,源代码如下threekingdomsFile=open('C:\\Users\\53469\\Desktop\\xfs\\python\\threekingdoms.txt','r');后来发现这是因为编码格式的原因,改成如下形式就可以了:threekingdomsFile=open('C:\\Users\\53469\\Desktop\\xfs\\python\\threekingdoms.txt','r',100,'utf-8');...
2022-05-23 23:05:09
640
1
原创 SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: truncated \UX
我在学习python遇到的问题分享给大家,记录自己的学习经历,也同时给大家分享一下,欢迎大家踊跃分享。出现:SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape#!/usr/bin/python3#-- coding: UTF-8 --import os, sys打开文件fd = os.open(“C:\Users\er
2022-05-23 23:02:22
1700
原创 关于Mybatis中keyProperty属性
Mybatis中insert标签的keyProperty属性的问题今天看一个教程,中间有用mybatis写一个新增的方法,使用到了mybatis中的insert标签,需要新增之后返回新增行的主键ID,由于主键是自增的,所以实现方法可以用到useGeneratedKeys以及keyProperty这两个属性。 例如这样:useGeneratedKeys="true" keyProperty="id" 新增的xml如图: 这里要注意几个问题: 1.keyProperty中对...
2022-05-23 15:46:30
611
原创 解决 Mybatis 报错 org.apache.ibatis.ognl.NoSuchPropertyException: XXXCriteria$Criterion.noValue
问题这个 noValue 一定存在,但是报错。 场景就是存在并发的情况下,尤其是在服务刚刚启动的时候,就会发生这个异常。但是很不幸,mybatis 3.4.1 之前,用的 OGNL 都是由这个问题。分析3.4.1 之前的版本的 OgnlRuntime,这里,第三个参数传 0,则永远都是 null。public static final Object getMethodValue(OgnlContext context, Object target, String propertyNam
2022-05-19 15:50:32
2148
原创 mysql报错 is longer than the server configured value of ‘wait_timeout‘
davinci使用腾讯云上的mysql的davinci数据看板用户没有新加的库读权限导致执行sql时报超时,没有提示无权限开始以为是mysql5.7添加json函数导致的,其实是因为权限不够导致的
2022-05-11 23:20:10
1096
原创 java String.replaceAll(“#“,“$“)报错Illegal group reference: group index is missing
java中String.replaceAll("#","$")时报错Illegal group reference: group index is missing解决方法改为下面的就可以添加转义符replaceAll("#","\\$");
2022-05-07 14:32:10
964
原创 IDEA命令行缩短器助你解决此问题:Command line is too long. Shorten command line...
idea切换项目后选择模块,shorten command line选择以上模式就不会报Command line is too long. Shorten command line...了
2022-05-07 12:05:21
522
原创 出现 Non-terminating decimal expansion; no exact representable decimal result 问题的解决方法
代码中使用了 BigDecimal 做精确计算,在做除法时,系统抛出 “ Non-terminating decimal expansion; no exact representable decimal result”。1 分析BigDecimal 是不可变的、任意精度的有符号十进制数,所以可以做精确计算。但在除法中,准确的商可能是一个无限长的十进制扩展;例如,1 除以 3 所得的商。我们在做除法时,没有指定舍入模式,并且无法表示为准确的结果,因此抛出了这个异常(java.lang.Arithmet
2022-05-05 14:06:10
8564
原创 idea的windows一个工作空间中有多个module时会出现莫名的很多包引用不到
1.File->ProjectStructure->Modules->LanguageLevel选择8-lambdas,默认的是52.同时选择maven的左上角的Reload All maven projects
2022-04-19 20:01:02
596
原创 activiti工作流UUID生成策略或获取主键id策略
springboot2.0 + activiti6.0 uuid生成策略Activiti 主键id生成逻辑Activiti里负责生成主键的类是IdGenerator,在初始化的时候,在ProcessEngineConfigurationImpl类里会判断该值是否为空,为空,则生成默认的DbIdGenerator,不为空就用已设置的。另外还会将该主键生成器赋值给DbSqlSessionFactory。在实际生成主键的过程中,生成历史流程实例时会使用ProcessEngineConfiguratio
2022-03-21 18:09:57
4017
1
原创 java业务开发常见错误100例list笔记
使用 List.subList 进行切片操作居然会导致 OOM?private static List<List<Integer>> data = new ArrayList<>();private static void oom() { for (int i = 0; i < 1000; i++) { List<Integer> rawList = IntStream.rangeClosed(1, 100000).box.
2022-03-14 14:41:53
3035
原创 mysql的CONCAT特殊用法等同于or关键字
select * from user t where CONCAT( t.`user_name`, t.`real_name` ) LIKE CONCAT( '%', '路', '%' )等同于下面sql语句,前提条件是user_name和real_name字段不能为空,否则统计的数据不全select * from sys_user t where t.`user_name` LIKE CONCAT( '%', '路', '%' ) or t.`real_name` LIKE CONCAT( '%'
2022-03-01 18:57:28
737
原创 Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cip
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) at sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:171) at sun.security.ssl.ClientHandshakeContex...
2022-02-15 13:02:08
5237
2
转载 Elasticsearch Trying to create too many scroll contexts. Must be less than or equal to 500
背景elasticsearch7.x 开始加上了软限制,max_open_scroll_context默认为500个,这个参数可以理解为数据库可用活跃连接数报错是因为虽然scroll id有一个存活时限,过期后会自动被清理,但在高并发情况下还是会有可能达到限制,从而报错Trying to create too many scroll contexts. Must be less than or equal to 500可以发送请求来查看es集群的open_context使用情况[G
2021-12-30 10:17:32
2727
原创 Elasticsearch Trying to create too many scroll contexts. Must be less than or equal to: [500]
在做数据导出的时候,因为用到了滚动。因为每次调用都创建了scroll,而且我没有手动删除,而es默认的scroll是500个。到达500个没有清除的手,就会报这个错误。错误如下 {"error":{"root_cause":[{"type":"exception","reason":"Trying to create too many scroll contexts. Must be less than or equal to: [500]. This limit can be set b...
2021-12-30 10:13:41
2362
原创 ES查询报错:entity content is too long [142501157] for the configured buffer limit [104857600]
java - org.apache.http.ContentTooLongException: entity content is too long [105539255] for the configured buffer limit [104857600] - Stack Overflow在生产环境批量同步数据的时候,我写了一个查询请求,然后直接报错:entity content is too long [142501157] for the configured buffer limit [104
2021-12-24 10:23:44
9572
原创 com.fasterxml.jackson.core.JsonParseException: Unrecognized token ‘xxx‘:
jquery ajax代码 $.ajax({ type:"post", url:"/webswmm/runModel", dataType:'json', contentType:"application/json;charset=UTF-8", data:{name:'goatling'}, async:true, suc...
2021-12-22 10:53:53
14820
mongodb学习笔记资料
2019-01-27
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人