摘要: catalina.home 一台机器通常只有一个, 指向Tomcat的安装目录 catalina.base 一台机器可以启动多个Context, 每个Context对应一个catalina.base, 每个WebApp对应一个Context 1. 在webApps目录下的war, 会自动创建Cont 阅读全文
posted @ 2018-07-20 22:53 funny_coding 阅读(496) 评论(0) 推荐(0) 编辑
摘要: 使用spring boot , MockBean @RunWith(SpringRunner.class) @SpringBootTest(classes = Application.class) public class DalListTest { @MockBean private XxxSer 阅读全文
posted @ 2018-07-20 13:46 funny_coding 阅读(1972) 评论(0) 推荐(0) 编辑
摘要: ConcurrentHashMap 1.7 segment分段锁 1.8 CAS 红黑树 阅读全文
posted @ 2018-07-19 18:23 funny_coding 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 多次start ?? IlleageStateException 阅读全文
posted @ 2018-07-19 18:18 funny_coding 阅读(84) 评论(0) 推荐(0) 编辑
摘要: hashCode 计算每个char值,并移位累加 计算后的hash值会缓存 阅读全文
posted @ 2018-07-19 18:14 funny_coding 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 定位流程 先使用一些轻便的工具查看总体情况, 如果情况糟糕, 再使用重量级的工具 jstack 查看线程数是否过多 jstat -gc -gcutil 查看gc次数和时间是否过多, 各个分区中堆的实际大小。 FULL gc过多会造成STOP WORLD, 应用响应停顿。 考虑使用其他垃圾收集方式, 阅读全文
posted @ 2018-07-18 17:24 funny_coding 阅读(182) 评论(0) 推荐(0) 编辑
摘要: docker run 时使用-m指定可以使用的内存大小, 记录在cgroup配置文件中 cat /sys/fs/cgroup/memory/memory.limit_in_bytes jvm内存会超过这个限制吗? 阅读全文
posted @ 2018-07-18 11:22 funny_coding 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 读性能有问题, 可以使用读写分离 写性能有问题, 可以使用数据分片 单机数据库 分布式数据库 https://developer.aliyun.com/lesson_1761_14684#_14684 参数 : 缓冲区大小, 临时表大小... 阅读全文
posted @ 2018-07-18 09:38 funny_coding 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Files工具包下包含创建临时文件, 文件copy, move等API 阅读全文
posted @ 2018-07-16 11:26 funny_coding 阅读(116) 评论(0) 推荐(0) 编辑
摘要: iptables 默认5个表, 不可增加其他表 1 raw 用于配置数据包,raw 中的数据包不会被系统跟踪。 2 filter 是用于存放所有与防火墙相关操作的默认表。 3 nat 用于 网络地址转换(例如:端口转发)。 4 mangle 用于对特定数据包的修改(参考 损坏数据包) 5 secur 阅读全文
posted @ 2018-07-13 11:49 funny_coding 阅读(2241) 评论(0) 推荐(0) 编辑
build beautiful things, share happiness