
java
文章平均质量分 57
万里阿远
细节 全面 发自内心
展开
-
Tomcat中文乱码
windows环境:tomcat启动springMVC项目乱码tomcat启动spring项目乱码修改Tomcat安装目录下conf目录里面的logger.properties文件encoding编码格式全部由UTF-8改为GBK(网上搜索可把我坑惨了,全部说在各个地方修改编码格式为UTF-8试了各种方式都不行)建议搜索开发工具的错误的时候如果是安装在windows环境一定要加上条件:如:windows下tomcat中文乱码...原创 2021-09-13 10:17:07 · 3675 阅读 · 0 评论 -
netty单机压测数据
机器配置:4核8处理器netty配置: NioEventLoopGroup loopGroup = new NioEventLoopGroup(2); NioEventLoopGroup loopGroup1 = new NioEventLoopGroup(coreProcessorsThread);//8 this.listenPort = listenPort; serverHandler.init(basePackage);原创 2021-05-07 14:56:19 · 1210 阅读 · 0 评论 -
JVM调优学习记录
JVM调优学习总结程序启动与停止脚本启动脚本停止脚本一级目录二级目录三级目录程序启动与停止脚本启动脚本#!/bin/bash. /etc/profiletype java >/dev/null 2>&1 || { echo >&2 "java not found, exit now !"; exit 1; }type jps >/dev/null 2>&1 || { echo >&2 "jps not found, exit原创 2021-04-12 14:45:25 · 394 阅读 · 0 评论 -
SpringBootTest自动注入失败@Autowired
注入失败的代码:import org.junit.Test;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.data.redis.core.StringRedisTemplate;public class LearnTest { @Autowired StringRedisTemplate stringRedisTemplate; @Test原创 2020-11-03 08:53:24 · 5280 阅读 · 1 评论 -
jackson:JsonNode.get().toString()获取字符串出错
使用jackson:JsonNode.get().toString()获取json中的字符串出错,多了一层双引号//msg="{"method": "get_weather_city","timestamp":234655464,"req_id": 10086,"params":{"cityId":892}}"JsonNode reqMsg = objectMapper.readTree(msg);String method=reqMsg.get("method").toString();//导致:原创 2020-10-27 16:28:51 · 1708 阅读 · 0 评论