自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(278)
  • 资源 (2)
  • 收藏
  • 关注

原创 Processing of multipart/form-data request failed. Stream ended unexpectedly

2023-02-24 11:37:53 1250 1

原创 MaxCompute踩坑记录

1. 单字段的大小为8M且不能修改, 可使用gzip压缩方案解决2. 构建查询SQL时, 数字类型的字段不能使用单/双引号, 否则会有意外惊喜. select * from table where id='123'会把id=124或id=126的查出来

2022-03-29 08:44:53 217

原创 Software caused connection abort: socket write error

执行mvn deploy命令时提示该错误, 确认代码没有问题, 且本地mvn install能成功.打开nexus控制台的监控页面, 发现线程统计项的 Blocked特别多, 怀疑是因机器本身资源或者并发的问题导致多个线程任务没有执行完被挂起卡住.重启nexus后解决...

2021-11-10 09:10:58 1320 1

原创 mac修改dns就卡死

使用命令方式修改查看有哪些网络networksetup -listallnetworkservices

2021-06-15 09:07:02 593

原创 No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

升级了macOS Big Sur之后执行mvn clean package命令提示No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?执行java -version和mvn -v命令显示都正常,最后的解决方案是1. 设置.bash_profile,之前没有配置过. 配置完执行source .bash_profileexport JAVA_HOME=$..

2021-05-21 10:41:08 104

转载 CURL -w 参数详解

通过CURL命令可以方便的查询各种http请求的问题,-w参数对于我们诊断问题非常重要,以下是-w参数对应的一些变量以及对应的解释:url_effective 最终获取的url地址,尤其是当你指定给curl的地址存在301跳转,且通过-L继续追踪的情形。http_code http状态码,如200成功,301转向,404未找到,500服务器错误等。(The numerical response code that was found in the last retrieved HTTP(S) or F

2021-04-29 09:12:45 372

原创 RedisAtomicLong生成重复数据

如图RedisAtomicLong的成员变量key在初始化时通过set(0)方法, 初始化成0. 在高并发时, 有很大的几率key的值被重置成0, 因此第一个自增值会重复

2021-04-28 14:07:47 1491

原创 TokenEndpoint : Handling Null Pointer Exception

springboot oauth2.0生成token时报错, 详细的日志没有打印出来, 需要手动配置log @Override public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception { endpoints.authenticationManager(authenticationManager); endpoints.userDeta

2021-04-21 13:45:27 1606 3

转载 A child container failed during start

2018-10-18 17:55:57.540 ERROR 16344 --- [cat-startStop-1] org.apache.catalina.core.ContainerBase : A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [Standa.

2020-08-20 10:17:15 111

原创 springboot配置文件application加载

//启动命令java -jar ./target/xxx-0.0.1-SNAPSHOT.jar --spring.profiles.active=test执行该启动命令时会先加载application.properties中的配置项,接着加载application-test.properties中的配置项,且application-test.properties的配置项会覆盖application.properties中同名的配置...

2020-08-13 10:58:11 201

原创 springboot的zuul网关并发控制配置调优

#服务器配置 2核2G#springboot 1.5.7.RELEASE#最大连接数server.tomcat.max-connections=3000#最大线程数server.tomcat.max-threads=200#熔断器:请求超时时间hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=60000#熔断器:使用信号量模式hystrix.command.default.execution.

2020-08-11 11:53:25 1686

原创 结合BeanPostProcessor的postProcessAfterInitialization添加springboot的feign拦截器

1. 添加拦截器//在创建完成Feign.Builder对象后,添加一个拦截器到Feign.Builder中//该拦截器可添加自定义请求参数,每次feign接口调用被触发时,都会经过该拦截器class BeanPostProcessor implements BeanPostProcessor { private Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired @Qualifie.

2020-08-11 11:44:58 1731

原创 Unable to start embedded Tomcat

Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]org.apache.catalina.LifecycleException: A child container failed during start系统启动时异常:org.springframework.context.ApplicationContextException: Unable to st

2020-08-11 11:37:18 293

转载 .gitignore不生效问题

问题:在使用git进行版本控制的过程中发现,将想被忽略的文件(文件夹)配置到.gitignore文件中后,实际修改了想被忽略的文件,调用git status查看时,仍然会提示提交这些文件。也就是说实际并没有被忽略原因:原因是git ignore只会对不在git仓库中的文件进行忽略,如果这些文件已经在git仓库中,则不会忽略。所以如果需要忽略的文件已经提交到本地仓库,则需要从本地仓库中删除掉,如果已经提交到远端仓库,则需要从远端仓库中删除。删除.gitignore文件才能实际生效。—————————

2020-07-24 17:31:00 104

原创 mybatis的拦截器的执行流程(以StatementHandler类型的拦截器为例)

1. 获取到dao层的动态代理对象org.apache.ibatis.binding.MapperProxy,并执行其invoke方法,该方法是入口2. 执行org.apache.ibatis.binding.MapperMethod.execute()3. 执行org.mybatis.spring.SqlSessionTemplate.selectList()4. 通过动态代理的方式执行...

2020-02-26 14:23:54 2855

原创 使用RamUsageEstimator计算对象占用堆内存大小

1. pom依赖<dependency> <groupId>org.apache.lucene</groupId> <artifactId>lucene-core</artifactId> <version>8.3.0</version></dependency>2....

2019-11-18 13:46:57 6494 1

转载 查看mysql数据库连接数、并发数相关信息

1.mysql> show status like 'Threads%';+-------------------+-------+| Variable_name| Value |+-------------------+-------+| Threads_cached| 58|| Threads_connected | 57|#...

2019-10-16 15:03:37 340

原创 Flash movie not yet registered

最后排查到的原因是webcam/jscam_canvas_only.swf, 这个文件的大小为0, 重新下载一个webcam插件解决该问题

2019-08-26 14:19:32 1770 1

原创 mybatis执行dao层操作数据库的流程(使用Druid连接池)

( 1)获取到dao层的动态代理对象org.apache.ibatis.binding.MapperProxy@63f53387,并执行其invoke方法,该方法是入口( 2)执行org.apache.ibatis.binding.MapperMethod.execute()方法,根据sql语句执行select/update/delete之一( 3)执行org.mybatis.spring.S...

2019-08-16 14:32:17 1120

原创 FlywayException: Validate failed: Detected resolved migration not applied to database

flyway执行升级脚本是按版本号升序依次执行的, 如果版本号为201908080001__add_table.sql的脚本已经被执行了, 这时执行版本号小于该脚本的, 如201908060001__add_table.sql, flyway会抛出该异常...

2019-08-08 13:37:27 5369

转载 Java: Hystrix And ThreadLocals

转https://medium.com/@saurav24081996/java-hystrix-and-threadlocals-95ea9e194e83ThreadLocal is a java class which provide thread-local variables, i.e. variables specific to thread. Popularly used a l...

2019-07-25 17:21:21 161

转载 外行人都能看懂的SpringCloud,错过了血亏

转https://zhuanlan.zhihu.com/p/43023436一、前言只有光头才能变强认识我的朋友可能都知道我这阵子去实习啦,去的公司说是用SpringCloud(但我觉得使用的力度并不大啊~~)...所以,这篇主要来讲讲SpringCloud的一些基础的知识。(我就是现学现卖了,主要当做我学习SpringCloud的笔记吧!)当然了,我的水平是有限的,可能会...

2019-07-23 12:01:18 147

转载 springcloud hystrix熔断器参数详解

转https://www.cnblogs.com/520playboy/p/8074347.html一、hystrix参数使用方法通过注解@HystrixCommand的commandProperties去配置,如下就是hystrix命令超时时间命令执行超时时间,为1000ms和执行是不启用超时@RestControllerpublic class MovieControll...

2019-07-19 17:27:16 650

转载 获取线程池中任务执行数量

转https://my.oschina.net/u/1000241/blog/1807703通过线程池进行任务处理,有时我们需要知道线程池中任务的执行状态。通过ThreadPoolExecutor的相关API实时获取线程数量,排队任务数量,执行完成线程数量等信息。private static ExecutorService es = new ThreadPoolExecutor(5...

2019-07-04 18:03:25 6275 1

转载 手机端H5调试的时候请求未映射到内网的域名获取接口数据的方法

转https://peloo.net/?p=757APP实际测试中接口兼容性测试,经常会用上个版本的APP包来测试新开发的接口是不是也可正常运行, 经常在一个手机上安装卸载新旧APP包,麻烦, 域名重定向可以帮你减轻重复劳动。 比如你要验证生产环境的APP包是否可以在测试环境的新接口上运行正常,可以在设置好手机代理后,对fiddler进行如下设置, 打开too...

2019-07-01 13:24:02 833

原创 nginx转发websocket的server配置

server { listen 31010 default_server; server_name websocket.xxx.com; root /usr/share/nginx/html; location / { proxy_http_version 1.1; proxy_set_header Upgrad...

2019-06-27 17:26:30 1219

转载 Mac下Vim编辑快捷键小结

转https://www.jianshu.com/p/6f13474d36ac一、移动光标移动到行尾"$",移动到行首"0"(数字),移动到行首第一个字符处"^"移动到段首"{",移动到段尾"}"移动到下一个词"w",移动到上一个词"b"移动到文档开始"gg",移动到文档结束"G"跳到第n行"ngg" 或 "nG" 或 ":n"移动光标到屏幕顶端"H",移动到屏幕中间"...

2019-06-19 10:24:09 562

转载 Linux中zip压缩和unzip解压缩命令详解

转https://www.jb51.net/LINUXjishu/105916.html1、把/home目录下面的mydata目录压缩为mydata.zipzip -r mydata.zip mydata #压缩mydata目录2、把/home目录下面的mydata.zip解压到mydatabak目录里面unzip mydata.zip -d mydatabak3、把/hom...

2019-06-18 10:06:38 179

转载 springboot max-http-header-size参数引起的内存溢出问题排查

转https://juejin.im/post/5cc97680518825405b56b466上周运维反馈线上程序出现了OOM,程序日志中的输出为Exception in thread "http-nio-8080-exec-1027" java.lang.OutOfMemoryError: Java heap spaceException in thread "http-nio-...

2019-06-12 11:59:38 20914

原创 javax.mail.MessagingException: Unable to load BODYSTRUCTURE

解决方法是拷贝一个Message, 信息从拷贝的Message中获取// Get the message object from the folder in the// usual way, for example:MimeMessage msg = (MimeMessage)folder.getMessage(n);// Use the MimeMessage copy const...

2019-05-28 14:11:30 2397

原创 使用flyway升级数据库, 编写可重复执行的增加字段和索引的存储过程

/* 添加字段 */DELIMITER $$DROP PROCEDURE IF EXISTS `add_column` $$CREATE PROCEDURE add_column()BEGIN IF NOT EXISTS( SELECT * FROM information_schema.columns WHERE table_schema='dbName' AND table_na...

2019-05-15 10:50:37 2366 1

转载 微信接口返回码对照表

转https://blog.csdn.net/sinat_32366329/article/details/78868000全局返回码说明公众号每次调用接口时,可能获得正确或错误的返回码,开发者可以根据返回码信息调试接口,排查错误。全局返回码说明如下:返回码说明-1系统繁忙,此时请开发者稍候再试0请求成功40001获取 access_token 时 AppSe...

2019-05-10 13:38:27 2630

原创 git克隆代码库时使用指定的用户名密码

git clone http://username:[email protected]:8080/repository/project.git

2019-03-19 14:23:06 7559

原创 rocketmq发送消息时不能自动创建topic: No route info of this topic

1. 启动broker时加上autoCreateTopicEnable=true, Windows下的命令start mqbroker.cmd -n 192.168.3.70:9876 autoCreateTopicEnable=true2. rocketmq服务端的版本和客户端的版本需要保持一致...

2019-01-03 14:03:53 15132 10

转载 使用Jackson美化输出json数据

转: https://javarevisited.blogspot.com/2015/05/how-to-print-json-string-in-java-jackson-example.html1. 引入依赖&lt;dependency&gt; &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt; &lt;arti...

2019-01-03 13:38:36 1634

原创 intellij idea关闭field injection is not recommended警告

Preferences-&gt;Editor-&gt;Inspections-&gt;Spring-&gt;Spring Core-&gt;Core-&gt;Field Injection warning  

2018-12-29 10:00:24 8943

转载 springboot不同环境的配置

转: https://www.cnblogs.com/whx7762/p/7992278.html1. springboot多环境配置在Spring Boot中多环境配置文件名需要满足application-{profile}.properties的格式,其中{profile}对应你的环境标识,比如:   application-dev.properties:开发环境   appl...

2018-12-18 09:28:18 302

原创 git 相关操作

1. cd到指定目录cd ~/Documents/java/workspace/2. 检出远端master到本地git clone http://192.168.1.100/repository/project.git2. 查看远端分支git branch -r3. 检出远端分支到本地git checkout branchName4. 也可以直接从远端的分支...

2018-11-12 16:43:56 186

转载 nginx将请求全部指向到html下的index.html页面

转: https://blog.csdn.net/z8853797/article/details/53898031server {        listen       80;        server_name  localhost;        location / {            try_files '' /index.html;        }   ...

2018-10-25 11:46:43 20426

转载 NGINX 反向代理错误:104: Connection reset by peer

转: https://my.oschina.net/u/1024107/blog/1838968此问题在于 nginx的buffer太小,timeout太小。http模块添加以下参数配置:client_body_buffer_size 20m;fastcgi_buffer_size 128k;fastcgi_buffers 4 128k;fastcgi_busy_buffe...

2018-10-25 07:55:49 19067

eclips项目的正常的settings文件

用于解决异常项目中No Spring WebApplicationInitializer types detected on classpath

2015-08-06

MySQL存储过程-存储过程

MySQL存储过程,存储过程,视图,触发器,信息架构视图

2011-04-07

空空如也

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

TA关注的人

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