不懂Java SPI机制,怎么进大厂

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","marks":[{"type":"color","attrs":{"color":"#40A9FF","name":"blue"}}],"text":"真正的大师永远怀着一颗学徒的心","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"引言","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在日常的项目开发中,我们为了提升程序的扩展性,经常使用面向接口的编程思想进行编程。这不仅体现了程序设计对于修改关闭,对于扩展开放的程序设计原则,同时也实现了程序可插拔。那么本文所阐述的SPI机制正是这种编程思想的体现。今天就和大家聊聊","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"SPI","attrs":{}}],"attrs":{}},{"type":"text","text":"到底是个什么鬼。顺便和大家一起看下","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Seata","attrs":{}}],"attrs":{}},{"type":"text","text":"框架中是怎么使用","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"SPI","attrs":{}}],"attrs":{}},{"type":"text","text":"机制来实现框架扩展的。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"什么是SPI","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在一般的开发逻辑中,都是服务提供方进行接口定义以及不同实现,服务调用方通过","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"API","attrs":{}}],"attrs":{}},{"type":"text","text":"的方式完成一次业务调用。但是这种方式对于服务调用方来说缺乏灵活性,不能根据自己的需要进行不同的实现加载。那么有没有一种机制可以赋予调用方更大的决策权呢?这个时候今天的主角SPI就隆重登场了。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"codeinline","content":[{"type":"text","text":"SPI(Service Provider Interface)","attrs":{}}],"attrs":{}},{"type":"text","text":",即服务提供者接口。听上去有点不明觉厉,不知道表达什么意思。按照我的理解,它就是一种服务发现机制。其本质就是将接口与实现进行解偶分离。区别于由服务实现方提供接口定义的","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"API","attrs":{}}],"attrs":{}},{"type":"text","text":"方式,","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"SPI","attrs":{}}],"attrs":{}},{"type":"text","text":"需要服务调用方进行接口声明,具体实现由第三方进行实现。简单来说,","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"SPI","attrs":{}}],"attrs":{}},{"type":"text","text":"就是生活中的甲方,你们这些乙方想要和我合作就必须按照我的要求来干活。通过这种方式调用方拥有了更大的灵活性,可以根据自身实际需要加载符合条件的实现。从而提升了程序的可扩展性,让服务提供方可以面向接口编程。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"这么棒的扩展机制怎么使用呢?我们只需要在","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"jar","attrs":{}}],"attrs":{}},{"type":"text","text":"包的","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"META-INF/services/","attrs":{}}],"attrs":{}},{"type":"text","text":"目录里同时创建一个以服务接口命名的文件。该文件里就是实现该服务接口的具体实现类的名称。而当外部程序装配这个模块的时候,就能通过该","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"jar","attrs":{}}],"attrs":{}},{"type":"text","text":"包","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"META-INF/services/","attrs":{}}],"attrs":{}},{"type":"text","text":"里的配置文件找到具体的实现类名,并装载实例化,完成实现类的的加载注入。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"使用方提供规则说明,实际服务提供方完成具体实现。其实这种思想和","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Spring","attrs":{}}],"attrs":{}},{"type":"text","text":"中的组件扫描是类似的,都是先指定好规则,服务提供方根据规范让框架自动进行服务发现。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/f0/f0fd51814e38e0c248cc02f6ebbcc947.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"重点来了,知识点来了,敲黑板了。自此我们可以发现,无论是本文谈到的","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"SPI","attrs":{}}],"attrs":{}},{"type":"text","text":",还是","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"SpringBoot","attrs":{}}],"attrs":{}},{"type":"text","text":"中的自动配置原理,实际都是一种约定大于配置的开发思想,通过事先约定好的内容,进行具体实现,从而提升程序的扩展性。所以希望大家在看一项技术时,除了关注技术细节,进行纵向了解,也要关注横向技术对比,从而找到这些技术的共通之处,了解其背后的设计思想,我一直觉得这个是非常重要的,毕竟招式一直都是在变化,但是内功修炼可以催生出新的招式。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"SPI实现分析","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"SPI使用","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"以","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Mysql","attrs":{}}],"attrs":{}},{"type":"text","text":"的驱动加载为例,首先定义好需要进行扩展的模板接口,即为","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"java.sql.Driver","attrs":{}}],"attrs":{}},{"type":"text","text":"接口。各个数据库厂商可以更具自身数据库的特点进行对应的驱动开发,但是都要遵从这个模板接口。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/52/525ffe03684da39d7ec5d516ccd99a46.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在Mysql的驱动二方包中,在其 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Classpath","attrs":{}}],"attrs":{}},{"type":"text","text":" ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"路径下的","attrs":{}}],"attrs":{}},{"type":"text","text":" META-INF/services/ 目录中,创建一个以服务接口完全名称一致的的文件,在这个文件中保存的内容是模板接口具体实现类的完全限定名。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/7a/7a3f9229b737b81d095dc2b73cfaa7c4.png","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在对应的目录中进行具体的类实现,这些实现类都实现了","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"java.sql.Driver","attrs":{}}],"attrs":{}},{"type":"text","text":"接口。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/29/293334bfdd8b558c02829c4ddeefa763.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"具体的代码实现,通过","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"ServiceLoader","attrs":{}}],"attrs":{}},{"type":"text","text":"加载对应的实现类,完成类的实例化操作。当然这个ServiceLoader也可以自己定义,像","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Dubbo","attrs":{}}],"attrs":{}},{"type":"text","text":"、","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Seata","attrs":{}}],"attrs":{}},{"type":"text","text":"这样的框架都自己定义类加载器。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"codeblock","attrs":{"lang":"text"},"content":[{"type":"text","text":"public final class ServiceLoader\n implements Iterable\n{\n \n private static final String PREFIX = \"META-INF/services/\";\n ...\n public static ServiceLoader load(Class service,\n ClassLoader loader)\n{\n return new ServiceLoader<>(service, loader);\n }\n\n public static ServiceLoader load(Class service) {\n ClassLoader cl = Thread.currentThread().getContextClassLoader();\n return ServiceLoader.load(service, cl);\n }\n\n private ServiceLoader(Class svc, ClassLoader cl) {\n service = Objects.requireNonNull(svc, \"Service interface cannot be null\");\n loader = (cl == null) ? ClassLoader.getSystemClassLoader() : cl;\n acc = (System.getSecurityManager() != null) ? AccessController.getContext() : null;\n reload();\n }\n ...\n}\n","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我们一起来分析下这个服务加载器的工作流程,首先通过","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"ServiceLoader.load()","attrs":{}}],"attrs":{}},{"type":"text","text":"进行加载。先获取当前线程绑定的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"ClassLoader","attrs":{}}],"attrs":{}},{"type":"text","text":",如果当前线程绑定的 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"ClassLoader","attrs":{}}],"attrs":{}},{"type":"text","text":"为","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"null","attrs":{}}],"attrs":{}},{"type":"text","text":",则使用","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"SystemClassLoader","attrs":{}}],"attrs":{}},{"type":"text","text":"进行代替,而后清除一下","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"provider","attrs":{}}],"attrs":{}},{"type":"text","text":"缓存,最后创建一个","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"LazyIterator","attrs":{}}],"attrs":{}},{"type":"text","text":"。 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"LazyIterator","attrs":{}}],"attrs":{}},{"type":"text","text":"的部分源码如下:","attrs":{}}]},{"type":"codeblock","attrs":{"lang":"text"},"content":[{"type":"text","text":"private class LazyIterator implements Iterator\n {\n\n Class service;\n ClassLoader loader;\n Enumeration configs = null;\n Iterator pending = null;\n String nextName = null;\n\n\n ...\n \n public boolean hasNext() {\n if (acc == null) {\n return hasNextService();\n } else {\n PrivilegedAction action = new PrivilegedAction() {\n public Boolean run() { return hasNextService(); }\n };\n return AccessController.doPrivileged(action, acc);\n }\n }\n ...\n \n private boolean hasNextService() {\n if (nextName != null) {\n return true;\n }\n if (configs == null) {\n try {\n //key:获取完全限定名\n String fullName = PREFIX + service.getName();\n if (loader == null)\n configs = ClassLoader.getSystemResources(fullName);\n else\n configs = loader.getResources(fullName);\n } catch (IOException x) {\n fail(service, \"Error locating configuration files\", x);\n }\n }\n while ((pending == null) || !pending.hasNext()) {\n if (!configs.hasMoreElements()) {\n return false;\n }\n pending = parse(service, configs.nextElement());\n }\n nextName = pending.next();\n return true;\n }\n ...\n\n\n}\n","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"codeinline","content":[{"type":"text","text":"key","attrs":{}}],"attrs":{}},{"type":"text","text":":通过预定好的目录地址以及类名来指定类的具体地址,类加载器根据这个地址来加载具体的实现类。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"大致的SPI加载过程如下所示:","attrs":{}}]},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/4f/4f9cbfddd21b9c476fb49fe7ec9948d4.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"Seata如何使用SPI","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"codeinline","content":[{"type":"text","text":"Seata","attrs":{}}],"attrs":{}},{"type":"text","text":"是一个分布式事务的框架,具体的使用这里不再赘述,有时间可以出专门写它的文章。本节主要关注Seata是如何利用SPI的方式进行框架能力扩展的。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Seata","attrs":{}}],"attrs":{}},{"type":"text","text":"框架中使用 ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"EnhancedServiceLoader","attrs":{}}],"attrs":{}},{"type":"text","text":" 实现服务载入,通过名称我们可以知道他是一种增强型的","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"ServiceLoader","attrs":{}}],"attrs":{}},{"type":"text","text":"。那么相对于JDK自身的","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"ServiceLoader","attrs":{}}],"attrs":{}},{"type":"text","text":",他到底强在哪里呢?","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"由下图可知, ","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"EnhancedServiceLoader","attrs":{}}],"attrs":{}},{"type":"text","text":"不仅支持","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Java","attrs":{}}],"attrs":{}},{"type":"text","text":"原生的服务发现目录,同样支持自己自定义的","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"META-INF/seata/","attrs":{}}],"attrs":{}},{"type":"text","text":"目录。","attrs":{}}]},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/97/97f31a195697680cb511e044e6807eb4.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"另外在具体接口实现类上都有@LoadLevel的注解,如果其中有多个配置中心实现类都被加载,那么可以根据对应注解上的属性","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"order","attrs":{}}],"attrs":{}},{"type":"text","text":"进行排序。将实际优先级最大的类进行加载。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/d8/d81ce9922478d6b95d661345674cb885.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我们都知道注册中心是微服务体系中的必不可少的基础组件,它记录了服务提供者的地址信息。那么在","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Seata","attrs":{}}],"attrs":{}},{"type":"text","text":"中,","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Seata","attrs":{}}],"attrs":{}},{"type":"text","text":"的客户端如事务管理器","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"TM","attrs":{}}],"attrs":{}},{"type":"text","text":"、资源管理器RM需要与事务协调者","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"TC","attrs":{}}],"attrs":{}},{"type":"text","text":"进行通信,那么就需要通过注册中心来获取服务端的地址信息。","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Seata","attrs":{}}],"attrs":{}},{"type":"text","text":"注册中心支持多个第三方注册中心,如","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Consul","attrs":{}}],"attrs":{}},{"type":"text","text":"、","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Apollo","attrs":{}}],"attrs":{}},{"type":"text","text":"、","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Etcd3","attrs":{}}],"attrs":{}},{"type":"text","text":"等。我们来看下","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Seata","attrs":{}}],"attrs":{}},{"type":"text","text":"是怎么使用SPI机制来实现对于多个注册中心扩展支持的。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"首先定义一个","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"ConfigurationProvider","attrs":{}}],"attrs":{}},{"type":"text","text":"的接口,你看是不是嗅到了熟悉的味道,只要使用","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"SPI","attrs":{}}],"attrs":{}},{"type":"text","text":"那么就需要首先把规矩给小弟们定好。","attrs":{}}]},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/21/21f72b2ce9d74b4dea4955d793e23d2d.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"接着在对应的包","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"META-INF/services/","attrs":{}}],"attrs":{}},{"type":"text","text":"中定义具体实现类,如此处的","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"Consul","attrs":{}}],"attrs":{}},{"type":"text","text":"配置中心中定义了","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"ConsulConfigurationProvider","attrs":{}}],"attrs":{}},{"type":"text","text":"。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/28/283533a6c993eb45757dfe57c600c3a0.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我们可以看到","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"ConsulConfigurationProvider","attrs":{}}],"attrs":{}},{"type":"text","text":"实现了","attrs":{}},{"type":"codeinline","content":[{"type":"text","text":"ConfigurationProvider","attrs":{}}],"attrs":{}},{"type":"text","text":"的接口。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/e0/e0904f3ef79331b31f79aab130a15aa0.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我是慕枫,感谢各位小伙伴点赞、收藏和评论,文章持续跟新,我们下期再见!","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"微信搜索:","attrs":{}},{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"慕枫技术笔记","attrs":{}},{"type":"text","text":",优质文章持续更新,我们有学习打卡的群可以拉你进,一起努力冲击大厂,另外有很多学习以及面试的材料提供给大家。","attrs":{}}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/7f/7ff6f4cf7dc92ed189149727ace4dc43.gif","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章