{"id":201221,"date":"2025-05-10T09:10:08","date_gmt":"2025-05-10T01:10:08","guid":{"rendered":"https:\/\/server.hk\/cnblog\/201221\/"},"modified":"2025-05-10T09:10:08","modified_gmt":"2025-05-10T01:10:08","slug":"%e4%bb%8e%e9%9b%b6%e6%90%ad%e5%bb%baspringboot2-x%e6%95%b4%e5%90%88redis%e6%a1%86%e6%9e%b6%e7%9a%84%e8%af%a6%e7%bb%86%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/201221\/","title":{"rendered":"\u4ece\u96f6\u642d\u5efaSpringBoot2.X\u6574\u5408Redis\u6846\u67b6\u7684\u8be6\u7ec6\u6559\u7a0b"},"content":{"rendered":"<p><b><\/b> <\/p>\n<h1>\u4ece\u96f6\u642d\u5efaSpringBoot2.X\u6574\u5408Redis\u6846\u67b6\u7684\u8be6\u7ec6\u6559\u7a0b<\/h1>\n<p><span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span> <\/p>\n<p>\u672c\u7bc7\u6587\u7ae0\u7ed9\u5927\u5bb6\u5206\u4eab\u300a\u4ece\u96f6\u642d\u5efaSpringBoot2.X\u6574\u5408Redis\u6846\u67b6\u7684\u8be6\u7ec6\u6559\u7a0b\u300b\uff0c\u8986\u76d6\u4e86\u6570\u636e\u5e93\u7684\u5e38\u89c1\u57fa\u7840\u77e5\u8bc6\uff0c\u5176\u5b9e\u4e00\u4e2a\u8bed\u8a00\u7684\u5168\u90e8\u77e5\u8bc6\u70b9\u4e00\u7bc7\u6587\u7ae0\u662f\u4e0d\u53ef\u80fd\u8bf4\u5b8c\u7684\uff0c\u4f46\u5e0c\u671b\u901a\u8fc7\u8fd9\u4e9b\u95ee\u9898\uff0c\u8ba9\u8bfb\u8005\u5bf9\u81ea\u5df1\u7684\u638c\u63e1\u7a0b\u5ea6\u6709\u4e00\u5b9a\u7684\u8ba4\u8bc6(B \u6570)\uff0c\u4ece\u800c\u5f25\u8865\u81ea\u5df1\u7684\u4e0d\u8db3\uff0c\u66f4\u597d\u7684\u638c\u63e1\u5b83\u3002<\/p>\n<p>\u6700\u8fd1\u4e5f\u4e0d\u77e5\u9053\u5199\u5565\uff0c\u770b\u4e4b\u524d\u5199\u8fc7Kafka\u6574\u5408Springboot\u7684\u6587\u7ae0\uff0c\u5927\u5bb6\u53cd\u54cd\u8fd8\u633a\u70ed\u70c8\u7684\uff0c\u563f\u563f\u563f\uff0c\u5c31\u611f\u89c9\u5e2e\u52a9\u5230\u5927\u5bb6\u4e86\u8fd8\u633a\u597d\u7684\uff0c\u4e5f\u7b97\u662f\u8fbe\u5230\u4e86\u81ea\u5df1\u7684\u76ee\u7684\uff0c\u6b63\u597d\uff0c\u4eca\u5929\u4e1a\u52a1\u6a21\u5757\u662fspringboot\u6574\u5408redis\uff0c\u56e0\u4e3a\u4e4b\u524d\u505a\u8fc7\uff0c\u6240\u4ee5\u6709\u73b0\u6210\u7684\u4ee3\u7801\uff0ccv\u4e00\u4e0b\u4e4b\u540e\u5c31\u53ef\u4ee5\u4e86\uff0c\u6240\u4ee5\u65f6\u95f4\u6bd4\u8f83\u591a\uff0c\u90a3\u5c31\u7ed9\u5927\u5bb6\u6574\u7406\u4e00\u4e0bSpringboot\u6574\u5408Redis\u7684\u4ee3\u7801\u5b9e\u73b0\u5427\uff0c\u4ece\u9879\u76ee\u642d\u5efa\u5230\u6e90\u7801\u5b9e\u73b0\uff0c\u4e0b\u9762\u5168\u90fd\u6709\uff0c\u8010\u5fc3\u770b\u5b8c\uff0c\u76f8\u4fe1\u4f1a\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\u7684<\/p>\n<p>\u597d\u4e86\uff0c\u8bdd\u4e0d\u591a\u8bf4\uff0c\u6211\u4eec\u5f00\u59cb\u5427\uff0c\u540c\u6837\u7684\uff0c\u8fd8\u662f\u5efa\u8bae\u80fd\u591f\u81ea\u5df1\u5728\u81ea\u5df1\u7684PC\u7aef\u5b9e\u73b0\u4e00\u4e0b<br \/> \u4e2a\u4eba\u516c\u4f17\u53f7\uff1aJava\u67b6\u6784\u5e08\u8054\u76df\uff0c\u6bcf\u65e5\u66f4\u65b0\u6280\u672f\u597d\u6587<\/p>\n<h2>\u4e00\u3001\u4f7f\u7528Spring Initializr\u521b\u5efa\u9879\u76eeweb\u9879\u76ee<\/h2>\n<p>1\u3001File\u2192New\u2192Project<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167247903263b0013875de1.png\" class=\"aligncenter\"><\/p>\n<p>2\u3001\u70b9\u51fbNext\u5982\u56fe\u6240\u793a\uff0c\u547d\u540d\u597dGroup\u548cArtifact<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167247903263b00138d5cdf.png\" class=\"aligncenter\"><\/p>\n<p>3\u3001Next\u540e\u5982\u56fe\u6240\u793a\uff0c\u52fe\u9009\u4e2d\u9700\u8981\u7684\u4f9d\u8d56\uff0cSpring Initializr\u4f1a\u81ea\u52a8\u5bfc\u5165\u6240\u9700\u7684starter<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167247903363b001393a6c7.png\" class=\"aligncenter\"><\/p>\n<p>4\u3001\u521b\u5efa\u9879\u76ee\u6210\u529f\u540e\uff0cpom.xml\u6587\u4ef6\u4e2d\u7684\u4f9d\u8d56\u5982\u4e0b<\/p>\n<pre>\n\n\n   \n    \n     4.0.0\n    \n    \n     \n      org.springframework.boot\n     \n     \n      spring-boot-starter-parent\n     \n     \n      2.2.2.RELEASE\n     \n     \n     \n    \n    \n     com.heny\n    \n    \n     spring-boot-redis\n    \n    \n     0.0.1-SNAPSHOT\n    \n    \n     spring-boot-redis\n    \n    \n     Demo project for Spring Boot\n    \n    \n     \n      1.8\n     \n    \n    \n     \n      \n       org.springframework.boot\n      \n      \n       spring-boot-starter-web\n      \n     \n     \n      \n       org.mybatis.spring.boot\n      \n      \n       mybatis-spring-boot-starter\n      \n      \n       2.1.1\n      \n     \n     \n      \n       mysql\n      \n      \n       mysql-connector-java\n      \n      \n       runtime\n      \n     \n     \n      \n       org.springframework.boot\n      \n      \n       spring-boot-starter-test\n      \n      \n       test\n      \n      \n       \n        \n         org.junit.vintage\n        \n        \n         junit-vintage-engine\n        \n       \n      \n     \n    \n    \n     \n      \n       \n        org.springframework.boot\n       \n       \n        spring-boot-maven-plugin\n       \n      \n     \n    \n   <\/pre>\n<p>5\u3001\u5728pom.xml\u6587\u4ef6\u4e2d\u6dfb\u52a0redis\u7684starter<\/p>\n<pre>\n\n   \n    \n     org.springframework.boot\n    \n    \n     spring-boot-starter-data-redis\n    \n   <\/pre>\n<p>6\u3001\u521b\u5efaJavaBean\u7528\u4e8e\u5c01\u88c5\u6570\u636e\u5e93\u6570\u636e\uff0c\u9700\u8981\u5b9e\u73b0Serializable<\/p>\n<pre>\npackage com.henya.springboot.bean;\n\nimport java.io.Serializable;\n\npublic class Employee implements Serializable{\n\t\n\tprivate Integer id;\n\tprivate String lastName;\n\tprivate String email;\n\tprivate Integer gender; \/\/\u6027\u522b 1\u7537 0\u5973\n\tprivate Integer dId;\n\t\n\t\n\tpublic Employee() {\n\t\tsuper();\n\t}\n\n\t\n\tpublic Employee(Integer id, String lastName, String email, Integer gender, Integer dId) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.lastName = lastName;\n\t\tthis.email = email;\n\t\tthis.gender = gender;\n\t\tthis.dId = dId;\n\t}\n\t\n\tpublic Integer getId() {\n\t\treturn id;\n\t}\n\tpublic void setId(Integer id) {\n\t\tthis.id = id;\n\t}\n\tpublic String getLastName() {\n\t\treturn lastName;\n\t}\n\tpublic void setLastName(String lastName) {\n\t\tthis.lastName = lastName;\n\t}\n\tpublic String getEmail() {\n\t\treturn email;\n\t}\n\tpublic void setEmail(String email) {\n\t\tthis.email = email;\n\t}\n\tpublic Integer getGender() {\n\t\treturn gender;\n\t}\n\tpublic void setGender(Integer gender) {\n\t\tthis.gender = gender;\n\t}\n\tpublic Integer getdId() {\n\t\treturn dId;\n\t}\n\tpublic void setdId(Integer dId) {\n\t\tthis.dId = dId;\n\t}\n\t@Override\n\tpublic String toString() {\n\t\treturn \"Employee [id=\" + id + \", lastName=\" + lastName + \", email=\" + email + \", gender=\" + gender + \", dId=\"\n\t\t\t\t+ dId + \"]\";\n\t}\n}<\/pre>\n<p>\u6ce8\u610f\uff1a<br \/> \u5728\u5199JavaBean\u5bf9\u8c61\u65f6\u9700\u8981\u5b9e\u73b0Serializable\u63a5\u53e3\u5426\u5219\u4f1a\u62a5\u4ee5\u4e0b\u9519\u8bef\uff1a<\/p>\n<blockquote>\n<p>Cannot deserialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException<\/p>\n<\/blockquote>\n<p>7\u3001\u6574\u5408Mybatis\u64cd\u4f5c\u6570\u636e\u5e93\uff0c\u5728application.properties\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6e\u6570\u636e\u6e90\u4fe1\u606f<\/p>\n<pre>\n#serverTimezone\u7528\u4e8e\u6307\u5b9a\u65f6\u533a\uff0c\u4e0d\u7136\u4f1a\u62a5\u9519\nspring.datasource.url=jdbc:mysql:\/\/localhost:3306\/cache?serverTimezone=UTC\nspring.datasource.username=root\nspring.datasource.password=123456\n\n# \u5f00\u542f\u9a7c\u5cf0\u547d\u540d\u6cd5\u89c4\u5219\nmybatis.configuration.map-underscore-to-camel-case=true\n#\u65e5\u5fd7\u7ea7\u522b\nlogging.level.com.henya.springboot.mapper=debug<\/pre>\n<p>8\u3001\u4f7f\u7528\u6ce8\u89e3\u7248Mybatis\u521b\u5efaMapper<\/p>\n<pre>\npackage com.henya.springboot.mapper;\n\n\nimport com.henya.springboot.bean.Employee;\nimport org.apache.ibatis.annotations.*;\n\n@Mapper\npublic interface EmployeeMapper {\n\n @Select(\"SELECT * FROM employee WHERE id=#{id}\")\n public Employee getEmpById(Integer id);\n\n @Update(\"UPDATE employee SET lastName=#{lastName},email=#{email},gender=#{gender},d_id=#{dId} WHERE id=#{id}\")\n public void updateEmp(Employee employee);\n\n @Delete(\"DELETE FROM emlpoyee WHERE id=#{id}\")\n public void delEmpById(Integer id);\n\n @Insert(\"INSERT INTO employee(lastName, email, gender, d_id) VALUES (#{lastName}, #{email}, #{gender}, #{dId})\")\n public Employee insertEmp(Employee employee);\n\n @Select(\"SELECT * FROM employee WHERE lastName=#{lastName}\")\n public Employee getEmpByLastName(String lastName);\n}<\/pre>\n<p>\u6ce8\u610f\uff1a<br \/> \u9700\u8981\u4f7f\u7528\u4f7f\u7528@MapperScan\u6ce8\u89e3\u626b\u63cfMapper\u6240\u5728\u7684\u63a5\u53e3\uff0c\u53ea\u9700\u8981\u52a0\u5728\u4e3b\u7a0b\u5e8f\u7c7b\u4e0a\u5373\u53ef\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u8fd8\u8981\u4f7f\u7528@EnableCaching\u7528\u4e8e\u5f00\u542f\u7f13\u5b58\u3002<\/p>\n<pre>\n@MapperScan(\"com.henya.springboot.mapper\")\n@SpringBootApplication\n@EnableCaching \/\/\u5f00\u542f\u7f13\u5b58\npublic class SpringBootRedisApplication {\n\n\tpublic static void main(String[] args) {\n\t\tSpringApplication.run(SpringBootRedisApplication.class, args);\n\t}\n}<\/pre>\n<p>9\u3001\u7f16\u5199Service\u7c7b\uff0c\u7528\u4e8e\u8bbf\u95ee\u6570\u636e\u5e93\u6216redis\u7f13\u5b58<\/p>\n<pre>\npackage com.henya.springboot.service;\nimport com.henya.springboot.bean.Employee;\nimport com.henya.springboot.mapper.EmployeeMapper;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.cache.annotation.*;\nimport org.springframework.stereotype.Service;\n\n@CacheConfig(cacheNames = \"emp\") \/\/\u62bd\u53d6\u7f13\u5b58\u7684\u516c\u5171\u914d\u7f6e\n@Service\npublic class EmployeeService {\n @Autowired\n EmployeeMapper employeeMapper;\n\n \/**\n * @param id\n * @return\n *\/\n @Cacheable(cacheNames = {\"emp\"},keyGenerator = \"myKeyGenerator\")\n public Employee getEmpById(Integer id) {\n System.err.println(\"\u5f00\u59cb\u67e5\u8be2\"+ id +\"\u53f7\u5458\u5de5\");\n Employee employee = employeeMapper.getEmpById(id);\n return employee;\n }\n\n \/**\n * @CachePut\uff1a\u65e2\u8c03\u7528\u65b9\u6cd5\uff08\u8fd9\u4e2a\u65b9\u6cd5\u5fc5\u987b\u8981\u6267\u884c\uff09\uff0c\u53c8\u66f4\u65b0\u7f13\u5b58\u6570\u636e\n * @param employee\n * @return\n *\/\n @CachePut(value = \"emp\",key = \"#result.id\")\n public Employee updateEmp(Employee employee){\n System.err.println(\"\u5f00\u59cb\u66f4\u65b0\" + employee.getId() + \"\u53f7\u5458\u5de5\");\n employeeMapper.updateEmp(employee);\n return employee;\n }\n\n \/**\n * @CacheEvict\uff1a\u7f13\u5b58\u6e05\u9664\n * @param id\n *\/\n @CacheEvict(value = \"emp\",beforeInvocation = true)\n public void deleteEmp(Integer id){\n System.err.println(\"\u5220\u9664\" + id + \"\u5458\u5de5\");\n int i = 10\/0;\n }<\/pre>\n<p>10\u3001\u7f16\u5199Controller\u7c7b<\/p>\n<pre>\npackage com.henya.springboot.controller;\n\n\nimport com.henya.springboot.bean.Employee;\nimport com.henya.springboot.service.EmployeeService;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RestController;\n\n\/**\n * @Description:\n * @Author\uff1aHenYa\n * @CreatTime\uff1a2019\/12\/1 12:44\n *\/\n@RestController\npublic class EmployeeController {\n @Autowired\n EmployeeService employeeService;\n\n @GetMapping(\"\/emp\/{id}\")\n public Employee getEmpById(@PathVariable(\"id\") Integer id){\n Employee employee = employeeService.getEmpById(id);\n return employee;\n }\n\n @GetMapping(\"\/emp\")\n public Employee updateEmp(Employee employee){\n Employee emp = employeeService.updateEmp(employee);\n return emp;\n }\n}<\/pre>\n<h2>\u4e8c\u3001\u6d4b\u8bd5SpringBoot\u6574\u5408Redis\u662f\u5426\u6210\u529f<\/h2>\n<p>1\u3001\u5728\u6d4f\u89c8\u5668\u8bbf\u95ee\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u6d4b\u8bd5\u7c7b\uff0c\u7b14\u8005\u4f7f\u7528\u4e86\u6d4f\u89c8\u5668\u8bbf\u95eehttp:\/\/localhost:8080\/emp\/1\u8fdb\u884c\u6d4b\u8bd5\uff0c\u521d\u6b21\u8bbf\u95ee\u65f6\uff0c\u63a7\u5236\u53f0\u4f1a\u63d0\u793a\u5f00\u59cb\u67e5\u8be21\u53f7\u5458\u5de5\uff0c\u5982\u56fe\u6240\u793a\u3002<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167247903363b00139a397f.png\" class=\"aligncenter\"><\/p>\n<p>2\u3001\u518d\u6b21\u8bbf\u95ee\u65f6\uff0c\u63a7\u5236\u53f0\u5e76\u6ca1\u6709sql\u65e5\u5fd7\uff0c\u5982\u56fe\u6240\u793a\u3002<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167247903463b0013a0b103.png\" class=\"aligncenter\"><\/p>\n<p>3\u3001\u6b64\u65f6\u4f7f\u7528RedisDesktopManager\u5de5\u5177\u67e5\u770bredis\u65f6\u6709\u6570\u636e\uff0c\u5e76\u4e14cacheName\u4e3aemp\uff0c\u5982\u56fe\u6240\u793a<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167247903463b0013a66c87.png\" class=\"aligncenter\"><\/p>\n<p>\u53ea\u662femp\u5bf9\u8c61\u88ab\u5e8f\u5217\u5316\u4e86\u3002\u67e5\u770b\u6e90\u7801\u53ef\u77e5Redis\u9ed8\u8ba4\u4f7f\u7528Jdk\u8fdb\u884c\u5e8f\u5217\u5316\u3002<\/p>\n<pre>\nstatic RedisSerializer java(@Nullable ClassLoader classLoader) {\n return new JdkSerializationRedisSerializer(classLoader);\n }<\/pre>\n<p>\u67e5\u770bRedisSerializer\u63a5\u53e3\u7684\u5b9e\u73b0\u6709\u4ee5\u4e0b\u51e0\u79cd\uff1a<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167247903463b0013ac2cd5.jpg\" class=\"aligncenter\"><\/p>\n<p>\u6211\u4eec\u5e38\u7528\u7684\u5c31\u662f\u4ee5json\u7684\u683c\u5f0f\u8fdb\u884c\u5e8f\u5217\u5316\u3002\u4f46\u662f\u9700\u8981\u81ea\u5b9a\u4e49RedisCacheManager\u3002<\/p>\n<h2>\u4e09\u3001\u81ea\u5b9a\u4e49RedisCacheManager<\/h2>\n<pre>\npackage com.henya.springboot.config;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\nimport org.springframework.data.redis.cache.RedisCacheConfiguration;\nimport org.springframework.data.redis.cache.RedisCacheManager;\nimport org.springframework.data.redis.cache.RedisCacheWriter;\nimport org.springframework.data.redis.connection.RedisConnectionFactory;\nimport org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;\nimport org.springframework.data.redis.serializer.RedisSerializationContext;\nimport org.springframework.data.redis.serializer.RedisSerializer;\n\n\/**\n * @Description:\n * @Author\uff1aHenYa\n * @CreatTime\uff1a2019\/12\/6 20:50\n *\/\n@Configuration\npublic class MyRedisConfig {\n @Bean\n public RedisCacheManager empCacheManager(RedisConnectionFactory redisConnectionFactory){\n \/\/RedisCacheManager redisCacheManager = new RedisCacheManager(redisConnectionFactory);\n RedisCacheWriter redisCacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(redisConnectionFactory);\n\n RedisSerializer redisSerializer = new GenericJackson2JsonRedisSerializer();\n\n RedisSerializationContext.SerializationPair pair = RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer); RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig().serializeValuesWith(pair); \/\/ \u9ed8\u8ba4\u4f1a\u5c06CacheName\u4f5c\u4e3akey\u7684\u524d\u7f00 return new RedisCacheManager(redisCacheWriter, redisCacheConfiguration); } }<\/pre>\n<p>\u6b64\u65f6\uff0cRedis\u4e2d\u7f13\u5b58\u6570\u636e\u5c31\u4ee5Json\u7684\u683c\u5f0f\u8fdb\u884c\u5e8f\u5217\u5316\uff0c\u5982\u56fe\u6240\u793a\u3002<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20221231\/167247903563b0013b33bb9.png\" class=\"aligncenter\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ece\u96f6\u642d\u5efaSpringBoot2.&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-201221","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/201221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=201221"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/201221\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=201221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=201221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=201221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}