半个菜鸟程序员
半个菜鸟程序员elasticsearch基础
简介官网地址Elasticsearch 是一个分布式、RESTful 风格的搜索和数据分析引擎。Elasticsearch 属于apache组织。ELKELK是Elasticsearch、Logstash、Kibana三大开源框架首字母大写简称。市面上也被成为Elastic Stack。kibana
nacos配置中心
数据持久化nacos默认使用的是一个内嵌数据库derby,如果要连接derby需要先把nacos停止。derby默认帐号密码都是nacos。配置信息在config_info表
巧用ioc和设计模式优化ifelse
Autowired注解大家都常用,但其实还可以这么写@Servicepublic class TestFactory { @Autowired Map<String, ITestService> testServiceMap = new ConcurrentHashMap&l
nio(六)
NIO selector通信server端实现@Slf4jpublic class Server { public static void main(String[] args) throws IOException { // 1. 创建 selector,管理多个channel
nio(五)
文件编程FileChannel只能工作在阻塞模式下,不能用selector
nio(四)
模拟黏包半包 public static void main(String[] args) { ByteBuffer source = ByteBuffer.allocate(32); source.put("Hello,world\nI am zhang
nio(三)
ByteBuffer常用方法分配空间 public static void main(String[] args) { System.out.println(ByteBuffer.allocate(10).getClass()); System.out.printl
nio(二)
byteBuffer基本使用实例:data文件内容:1234567890abc public static void main(String[] args) { try (FileChannel channel = new FileInputStream("data.t
nio(一)
NIO基础1. 三大组件1.1 Channel & Buffer常见的channel有:FileChannelDatagramChannelSocketChannelServerSocketChannel常见的buffer:ByteBufferMappedByteBufferDirectBy
synchronized优化机制
synchronized优化升级机制