自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(664)
  • 资源 (1)
  • 收藏
  • 关注

原创 IDEA启动项目java.lang.OutOfMemoryError: GC overhead limit exceeded

直接扩大 shared build process heap size 解决问题。

2024-01-20 12:34:13 353

原创 IntelliJ Idea mapstruct java: Internal error in the mapping processor: java.lang.NullPointerExceptio

升级mapstruct版本到1.4.1.Final 问题解决。

2024-01-20 12:33:10 482

原创 axios multipart/form-data boundary 缺失 nodejs

axios 默认使用multipart/form-data 请求的时候,会丢失boundary,需要手工设置。

2023-06-08 17:36:28 851

原创 axios nodejs charles 设置代理抓取

【代码】axios nodejs charles 设置代理抓取。

2023-06-08 16:57:46 403

原创 nodejs axios 爬取excel文件并解析

nodejs excel文件爬取 及解析

2023-06-07 10:58:28 301

原创 mac电脑安装IDEA debug 卡顿问题解决

mac。idea 卡顿问题解决

2022-09-14 10:45:12 416 1

原创 java word 转html 的两种方法

java word html 转化

2022-06-24 16:01:09 1989 1

原创 JavaMail requires an InputStreamSource that creates a fresh stream for every call.

JavaMail requires an InputStreamSource that creates a fresh stream for every call.

2022-06-24 15:24:41 776

原创 javaMailSender 发送邮件设置昵称

昵称 邮件 java

2022-06-24 14:51:38 728

原创 String split 转 arrayList,java.lang.UnsupportedOperationException

split

2022-06-24 13:45:06 660

原创 InputStream转InputStreamSource

inputStream 转 inputStreamSource

2022-06-23 16:12:08 2296

原创 修改IDEA格式化单行注释 后增加空格

单行注释 增加空格

2022-06-08 10:07:41 2827 1

原创 mockito 无返回值方法及异常mock

mockito 异常

2022-06-06 14:14:22 10092

原创 Deprecated acceptsProfiles

Environment acceptsProfiles Deprecated 的替换方法

2022-05-25 12:42:09 153

原创 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version

SQL 当使用in 拼接 的时候当in中没有数据的时候,会包错如上如 AND (item_id IN ())需要在上游做空数组判断

2022-05-23 15:31:43 580

原创 IDEA 2022版本没有commit 对话框

老版本的IDEA 在project 下面都有一个commit 的对话框,但是在2022版本默认没有这个打开方式:setting->version contrl ->commit ->勾选上use no-modal commit interface ,则还原为老版本新版本推荐直接使用ctrl+k,呼唤出新的commit 提交对话框参考文档:https://www.jetbrains.com/help/idea/commit-changes-dialog.html...

2022-05-22 10:16:03 9924 1

原创 idea git 快捷键

提交commit:ctrl+kpush:ctrl+shift+k

2022-05-22 10:08:25 954

原创 org.springframework.beans.factory.annotation.value 防止不存在报错Could not resolve placeholder

@Value("${base.name?:'hehe'}")String name;当在application.yml 中没有配置base.name的时候,系统会报错:Could not resolve placeholder常规解决办法是补充一个配置也可以在@Value 值中通过三元运算符设置一个默认值...

2022-05-21 17:03:37 1189

原创 SpringBoot Cloud 配置优先级问题

第一优先级 JVM配置-Dbase.name=456第二优先级application.yml 或者application.properties第三优先级bootstrap.yml 后者bootstrap.properties

2022-05-21 16:08:34 347

原创 Springboot org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean wit

SpringBootTest 测试用例中,当引入@Autowird 一个包含 @Test 的类的时候,会报告找不到,autowird 的类不能有@test 测试否则报告UnsatisfiedDependencyException,无法加载该类

2022-05-17 15:34:54 601

原创 ScopeNotActiveException 异常

@Scope(value = WebApplicationContext.SCOPE_REQUEST)修改为@Scope(value = WebApplicationContext.SCOPE_REQUEST, proxyMode = ScopedProxyMode.TARGET_CLASS)问题解决Unsatisfied dependency expressed through field 'subClass'; nested exception is org.springframework.b

2022-05-17 12:45:33 1077

原创 mvn test 指定suit

方法1:使用命令行 mvn -DrunSuite=**/Junit5Suit test 2.配置POM <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <includes&gt.

2022-05-16 10:53:41 417

原创 MockMultipartFile mock文件上传

ClassPathResource resource = new ClassPathResource("XXX.js"); MockMultipartFile mfile = new MockMultipartFile("file", "XXX.js", "png", resource.getInputStream()); MvcResult mvcResult = mockMvc.perform(MockMvcRequestBuilders.multipart("/XX..

2022-05-13 17:13:49 7992

原创 fastJson的 引号兼容性

fastJson 支持 key不带引号,带带引号和双引号如下都能够正确parseTestClass test = JSON.parseObject(data,TestClass.class);{ "id": 4, 'label': "TTT 1/TTT", title: "TTTT", "path": "/TTTT"} <dependency> <groupId>com.alibaba</groupId>

2022-05-13 11:35:49 1159

原创 JAVA 中 JSON文件的读取

package com.example.demo.jsonParse;import com.alibaba.fastjson.JSON;import org.junit.jupiter.api.Test;import org.springframework.core.io.ClassPathResource;import org.springframework.util.FileCopyUtils;import java.io.IOException;import java.nio.char

2022-05-13 11:32:49 1806

原创 Junit4 Suite.SuiteClasses升级 junit5

在junit5 中已经没有Suite.SuiteClasses需要替换为org.junit.platform.suitejuni4代码@RunWith(Suite.class)@Suite.SuiteClasses({Junit4_1Test.class,Junit4Test.class})public class OneTest {}junit5代码@IncludeTags("production")@Suite@SelectPackages({"com.example.demo.

2022-05-12 18:27:44 394

原创 SpringBoot使用cobertura-maven-plugin生成代码覆盖率报表

pom配置 <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin>

2022-05-12 16:17:59 202

原创 查看mysql 数据库表字段编码

show full columns from XXX

2022-05-12 14:28:43 1253

原创 springboot 中 logging.config 的 logback默认配置文件地址

在springboot 配置logback 配置文件路径的时候当logging.config 不特殊指定基于约定默认加载:resources文件夹下的logback-spring.xml 文件

2022-05-11 12:51:51 3953

原创 No qualifying bean of type:scanBasePackages

Spring Boot 默认扫描当前包及子包如果需要加载其它包,需要增加scanBasePackages@SpringBootApplication(scanBasePackages = {“com.XXX”})用以解决:No qualifying bean of type问题

2022-05-06 11:56:02 334

原创 findAnnotation与getAnnotation的区别

findAnnotation:递归向上查找superclass,直到找到为止getAnnotation:仅仅查找本类的

2022-05-06 10:35:39 546

原创 当一个方法下线,@Deprecated ,需要指向另外一个方法时候

当一个方法下线,@Deprecated ,需要指向另外一个方法时候参见Date 的getYear * @see java.util.Calendar * @deprecated As of JDK version 1.1, * replaced by {@code Calendar.get(Calendar.YEAR) - 1900}.

2022-04-29 15:57:07 680

原创 微信小程序 抓包踩坑

微信小程序开发尝试抓包发现Android 无法完成抓包(android 普通浏览器能够抓Https,但是小程序无法抓包)IOS正常

2022-04-24 19:55:18 2811

原创 mybasticplus打印原始sql日志

mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl

2022-04-24 15:40:47 239

原创 SpringBoot max-threads设置方式(2.3 版本以后)

目前网上文章写设置SpringBoot tomcat 的max_threads 的方法为:server.tomcat.max-threads=250但是在springboot 2.3 以后已经修改为 server.tomcat.threads.max=400老的设置会不生效验证方法@Configurationpublic class EmbedTomcatConfig { @Bean WebServerFactoryCustomizer<ConfigurableServle

2022-04-20 16:52:05 3648

原创 Dubbo默认超时时间

默认超时时间为1秒(1000毫秒)消费者单个服务的超时时间限制@DubboReference(version = "1.0.0" ,timeout = 2000)全局设置dubbo: consumer: timeout: 2000

2022-04-20 10:33:10 3328

原创 podman -d参数

podman -d 则在后台运营不会在命令行前台打印执行日志

2022-04-19 09:35:41 244

原创 rampUp时间 jmeter

官方解释首先说明结论是:ramp up的值应该是启动全部线程所需的时间。就像官方的例子:我需要启动10个线程,并且10s启动一个线程,所以我的ramp up的值就是10*10=100s。我需要启动30个线程,并且设置的ramp up的值是120s,那我就是120/30=4s每4秒启动一个线程。参考文档:https://www.jianshu.com/p/018bc03d26c3...

2022-04-15 10:05:21 1995

原创 deprecated注释 原因

@Deprecated 标记下线接口或者属性的时候,希望能够说明下线原因及新的方法地址可以使用注释 /** * @deprecated 我为什么要下线这个字段或者方法,替代的字段或者方法是 {@link com.example.demo.SimpleCache.CacheObj#longData} */ @Deprecated private BigDecimal decimal;使用方看到的效果...

2022-04-14 11:48:27 296

原创 基于ConcurrentHashMap 最简单无超时时间的本地缓存类

基于:ConcurrentHashMap无缓存过期时间仅仅有缓存最大大小package com.example.demo.SimpleCache;import java.util.Map;import java.util.concurrent.ConcurrentHashMap;public class SimpleSimpleCacheUtils { private static final Integer CACHE_MAX_NUMBER = 100; private s

2022-04-12 19:43:24 634

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除