目录
一、数据层解决方案
1.1 SQL
1.1.1 数据源配置(Hikari)
1.1.2 持久化技术(JdbcTemplate)
1.1.3 H2数据库
1.2 NoSQL
1.2.1 Redis
1.2.2 Mongodb
1.2.3 ElasticSearch(ES)
一、数据层解决方案
1.1 SQL
![](https://img-blog.csdnimg.cn/5154774a502a443a8d7873fc48222bb9.png)
1.1.1 数据源配置(Hikari)
![](https://img-blog.csdnimg.cn/e74b91c3ec474a8dbc5e77d5f1eae0a2.png)
SpringBoot提供了3种内嵌的数据源对象供开发者选择
![](https://img-blog.csdnimg.cn/886f9ba2e1c74086b27ee6a6d1049d8b.png)
![](https://img-blog.csdnimg.cn/cac83aa0d43a4c658b73bf61ae75d442.png)
![](https://img-blog.csdnimg.cn/3d7092bc185245be81c7cd9ed7f03924.png)
1.1.2 持久化技术(JdbcTemplate)
![](https://img-blog.csdnimg.cn/f6397056a5cf4f3f86745276dfb79a35.png)
![](https://img-blog.csdnimg.cn/a855b888efd14d76b9fe7b1629986db3.png)
![](https://img-blog.csdnimg.cn/cdd748f9a49e44a893df9eb8666d2895.png)
![](https://img-blog.csdnimg.cn/2cb34757b20045a6a683fd51d4b2b2d4.png)
1.1.3 H2数据库
![](https://img-blog.csdnimg.cn/138de4d593c9424390c9cac94a571f3b.png)
![](https://img-blog.csdnimg.cn/e2eed9e815524a9997651367268967dc.png)
![](https://img-blog.csdnimg.cn/e27406b3971b446793db75de9c48fd97.png)
![](https://img-blog.csdnimg.cn/4b46fdf537504a008c00546476dbf6d9.png)
![](https://img-blog.csdnimg.cn/c8e438567d8b4d5887e6c11f91e7f657.png)
![](https://img-blog.csdnimg.cn/4ab341ba29b34569a5529cfe4dd0abf3.png)
![](https://img-blog.csdnimg.cn/b4e50e4b381b475f90deedaf788714eb.png)
![](https://img-blog.csdnimg.cn/66aa56e4dd3842f185cbb3266f336add.png)
![](https://img-blog.csdnimg.cn/608111eec19846f18c16118e719d5b26.png)
![](https://img-blog.csdnimg.cn/d8b0675907774a2d9a07d0f4c8f01d5a.png)
1.2 NoSQL
![](https://img-blog.csdnimg.cn/8910aa5889c64c5bb4510dc6ee36c0af.png)
1.2.1 Redis
![](https://img-blog.csdnimg.cn/554bf9097d6f4a44b256179cd43ae892.png)
SpringBoot整合Redis
![](https://img-blog.csdnimg.cn/891cb3dd323f4bcda279b67185970721.png)
![](https://img-blog.csdnimg.cn/62d5313824a449c6a107c496ef8e26ad.png)
![](https://img-blog.csdnimg.cn/7eace8d3672243d6a71ee12b34039c6d.png)
![](https://img-blog.csdnimg.cn/6931ad666bbe4a1d9f35da8eb7a1b560.png)
![](https://img-blog.csdnimg.cn/54c7634948eb4f56bcd920888190d58a.png)
![](https://img-blog.csdnimg.cn/5915835f0ae34398b5cbadd9883d3cbd.png)
SpringBoot读写Redis的客户端
![](https://img-blog.csdnimg.cn/04e4c917424c4d08bb7602b54456b84b.png)
![](https://img-blog.csdnimg.cn/5aea96cfb7484ae9b70632d49d7b9f43.png)
![](https://img-blog.csdnimg.cn/c6d219516c674beabf5db37fa8bcc274.png)
SpringBoot操作Redis客户端实现技术切换(jedis)
![](https://img-blog.csdnimg.cn/b28f17d37ebf4d10928e7ee731e22715.png)
![](https://img-blog.csdnimg.cn/3a8f6bd42a3b44e289f17fd3d70d4fe3.png)
![](https://img-blog.csdnimg.cn/c7c69232f56a42e39fce0cd01d63005b.png)
![](https://img-blog.csdnimg.cn/58f9c8c11d664947a92d6252d17878ef.png)
![](https://img-blog.csdnimg.cn/a0eb93b951bb4baabeeb53e32a8973fa.png)
1.2.2 Mongodb
![](https://img-blog.csdnimg.cn/ec7880e74f50428b89ad18d47b4a57f0.png)
![](https://img-blog.csdnimg.cn/3ec1d6e4e5a94e9492c1adda65d79f59.png)
![](https://img-blog.csdnimg.cn/ce12bf60e4b84942b408b324fbe798df.png)
![](https://img-blog.csdnimg.cn/be821b07683e4b5db6a2165763f2e98a.png)
![](https://img-blog.csdnimg.cn/7369f25ad18a487ab1344a84c728038a.png)
![](https://img-blog.csdnimg.cn/c630ceb282ba4d049df4d529c7be9f51.png)
![](https://img-blog.csdnimg.cn/3b767eea9f7a4da89f53ee0b520bfe8b.png)
SpringBoot整合Mongodb
![](https://img-blog.csdnimg.cn/062835bc4b1e4216af0dca7cebe25445.png)
![](https://img-blog.csdnimg.cn/cdbf60fbb1ce48c79587befa228ba061.png)
![](https://img-blog.csdnimg.cn/e061adf97c5546c5aa14a47c47753ac4.png)
![](https://img-blog.csdnimg.cn/c32998fff7ce483785c65425e49d5341.png)
1.2.3 ElasticSearch(ES)
![](https://img-blog.csdnimg.cn/0272b82b6e9f49d5b77e1fd814df91de.png)
![](https://img-blog.csdnimg.cn/3459e294fd79490c82fb8519ebf0e210.png)
![](https://img-blog.csdnimg.cn/b7bd162beaed43e9be19e00671f71a24.png)
![](https://img-blog.csdnimg.cn/acef5c8079fc43b2acdd4369e2176d35.png)
ES的索引操作
![](https://img-blog.csdnimg.cn/a80bdf4a7df64e2a8adc06f2c51ed318.png)
![](https://img-blog.csdnimg.cn/41087cf75da3496c906715d3abc7c3a3.png)
![](https://img-blog.csdnimg.cn/83f393d0f55c4cbcb58240b84acdf0b3.png)
![](https://img-blog.csdnimg.cn/71c1e809ef054c6c87b0fd37ac87cc5f.png)
![](https://img-blog.csdnimg.cn/b5803aa8ea194068a35b44a2499dfc8a.png)
ES的文档操作
![](https://img-blog.csdnimg.cn/8ef8d6612715448ca3bc7391d8ec28f5.png)
![](https://img-blog.csdnimg.cn/b9630f32db5f44878e53263d38555b5d.png)
![](https://img-blog.csdnimg.cn/8a29d1fa184b4c1aa8f671dfae0007ed.png)
![](https://img-blog.csdnimg.cn/3931a7408bd54b4988f13ab646f7a620.png)
SpringBoot整合ES客户端操作
![](https://img-blog.csdnimg.cn/9641a450f007460a8162a5789c40340f.png)
![](https://img-blog.csdnimg.cn/4bebb9ab170a4d07999410df961cbb36.png)
![](https://img-blog.csdnimg.cn/880324fcc845456c996a7df726b857a3.png)
![](https://img-blog.csdnimg.cn/a5245d3a2f544987bb8c6696d59560f4.png)
![](https://img-blog.csdnimg.cn/92372bd1c0e845a1a1d8749abc215cc5.png)
![](https://img-blog.csdnimg.cn/0dddc1cd0ab342dbbb60776dc67c4971.png)
添加文档
![](https://img-blog.csdnimg.cn/4c7a73a80f2d477a8402b149680c51e2.png)
![](https://img-blog.csdnimg.cn/5cb1c3998bdb48eab0a3b8f4ea868103.png)
![](https://img-blog.csdnimg.cn/33794042f42d47a5995d30342177f175.png)
![](https://img-blog.csdnimg.cn/68dc838c49014646a7c00bc4ef4d2943.png)
查询文档
![](https://img-blog.csdnimg.cn/f9b34cf112f54086a1c3112b8ff64791.png)
![](https://img-blog.csdnimg.cn/9018134672204024b6a0a7003e235aed.png)
![](https://img-blog.csdnimg.cn/a3635a9f45744c7e8638f05b5ae45037.png)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)