# Spring-mongodb **Repository Path**: shenzhanwang/Spring-mongodb ## Basic Information - **Project Name**: Spring-mongodb - **Description**: Spring boot连接mongoDB数据库 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 164 - **Forks**: 85 - **Created**: 2016-11-29 - **Last Updated**: 2025-04-11 ## Categories & Tags **Categories**: database-dev **Tags**: None ## README # Spring-boot-mongoDB 随着Nosql分布式数据库的不断出现,各种非关系型数据库的重要性日益涌现。本项目基于Spring-data的API,实现一个Spring boot连接文档数据库mongoDB,并对数据进行管理的基本功能,包含的内容如下: 1.包含对文档的基本增删改查(CRUD)的功能,基于Spring-data的MongoRepository扩展实现,update和insert操作本质上使用的同一个DAO接口,区别是update操作必须提供主键id,insert操作不提供id字段; 2.包含数据排序、分页的功能; 3.包含按条件进行数据筛选的功能; 4.前端分页插件使用Bootgrid,前端框架使用Bootstrap; 5.使用时,先开启mongoDB; 6.页面访问入口http://localhost:8081/mongodb/index 本项目的实例文档模式如下: ``` { "_id" : ObjectId("58369d57eab6bfd4371a5d37"), "_class" : "po.Picture", "filename" : "activiti教程", "path" : "f盘", "size" : NumberLong(9765) } ``` 效果图    ### 好书推荐  |购买地址| |--| || ### 专利文章 | | 标题 | 技术领域 | |---|----|------| | 1 | [一种基于微服务架构的车联网大数据分析系统](https://mp.weixin.qq.com/s?__biz=Mzg5MjY3OTk0OQ==&mid=2247484096&idx=1&sn=11677bc50cd18e448135319394238e80&chksm=c03b20a2f74ca9b41c7d1c1e60e1407e1530a98b86498822f387da26e551826f8136663b45a0#rd) | 微服务| | 2 | [一种流式数据场景下Elasticsearch索引的自动化扩容方法](https://mp.weixin.qq.com/s?__biz=Mzg5MjY3OTk0OQ==&mid=2247484167&idx=1&sn=94587b5e196bbda2d6cc4b976b03d0c7&chksm=c03b2165f74ca873b77380a23c4e06b71adf6ffc40634440f467fb71c20aa4cc2fe72a5d65a9#rd) | 搜索引擎 | | 3 | [大数据钻取分析方法、装置、设备及存储介质](https://mp.weixin.qq.com/s?__biz=Mzg5MjY3OTk0OQ==&mid=2247484385&idx=1&sn=6fe4a4ac34badd91db39b4cc042a3f18&chksm=c03b2183f74ca89508333f3d5c8330aa32248eda86e4cf7657a5a293e1bf9d49888fe78b1072#rd) | 大数据分析 | | 4 | [一种基于工作流引擎的自动化办公方法和系统](https://mp.weixin.qq.com/s?__biz=Mzg5MjY3OTk0OQ==&mid=2247484895&idx=1&sn=1094f0b9abef603e8126dea68db75cca&chksm=c03b27bdf74caeab50d56ac110b9ab0d36bc9b9069e311083a5c4295ab03ee4b0595a00a3ba2#rd) | 工作流引擎 | | 5 | [一种低延迟高性能实时数据仓库搭建的方法和系统](https://mp.weixin.qq.com/s?__biz=Mzg5MjY3OTk0OQ==&mid=2247485672&idx=1&sn=ef9b05e32790091f6e984d14624d9560&chksm=c03b2a8af74ca39c24c9354279036148cd72315f22d06ab63649808d70161d8b4f53d38cc5fb&scene=178&cur_album_id=3268880015212085251#rd) | 实时数仓 | | 6 | [一种基于数据治理的大数据中台架构系统](https://mp.weixin.qq.com/s?__biz=Mzg5MjY3OTk0OQ==&mid=2247485875&idx=1&sn=db58f023c92ca01cc1902e7bea806a48&chksm=c03b2bd1f74ca2c7b45f993386f443718a99a378a51d9be827c2e45b326c549a868089fbdd31&scene=178&cur_album_id=3268880015212085251#rd) | 数据中台 | ### 视频教程 |
| |--| | | ### 附录:中央技术储备仓库(Central Technique Reserve Repository) 1. [Spring boot整合Mybatis实现增删改查(支持多数据源)](https://gitee.com/shenzhanwang/SSM) 2. [Spring,SpringMVC和Hibernate的整合实现增删改查](https://gitee.com/shenzhanwang/SSH) 3. [Spring boot整合activiti工作流引擎实现OA开发](https://gitee.com/shenzhanwang/Spring-activiti) 4. [Ruoyi-boot集成工作流引擎Flowable实例](https://gitee.com/shenzhanwang/Ruoyi-flowable) 5. [Spring发布与调用REST风格的WebService](https://gitee.com/shenzhanwang/Spring-REST) 6. [Spring boot整合Axis调用SOAP风格的web服务](https://gitee.com/shenzhanwang/Spring-axis) 7. [Spring boot整合Apache Shiro实现RBAC权限控制](https://gitee.com/shenzhanwang/Spring-shiro) 8. [使用Spring security实现RBAC权限控制](https://gitee.com/shenzhanwang/spring-security-demo) 9. [Spring boot整合mongoDB文档数据库实现增删改查](https://gitee.com/shenzhanwang/Spring-mongoDB) 10. [Spring连接Redis实现缓存](https://gitee.com/shenzhanwang/Spring-redis) 11. [Spring连接图存数据库Neo4j实现增删改查](https://gitee.com/shenzhanwang/Spring-neo4j) 12. Spring boot整合列存数据库hbase实现增删改查 13. [Spring平台整合消息队列ActiveMQ实现发布订阅、生产者消费者模型(JMS)](https://gitee.com/shenzhanwang/Spring-activeMQ) 14. [Spring boot整合消息队列RabbitMQ实现四种消息模式(AMQP)](https://gitee.com/shenzhanwang/Spring-rabbitMQ) 15. Spring boot整合kafka 2.1.0实现大数据消息管道 16. [Spring boot整合websocket实现即时通讯](https://gitee.com/shenzhanwang/Spring-websocket) 17. [Spring security整合oauth2实现token认证](https://gitee.com/shenzhanwang/Spring-security-oauth2) 18. [Spring boot整合MinIO客户端实现文件管理](https://gitee.com/shenzhanwang/Spring-minio) 19. 23种设计模式,源码、注释、使用场景 20. [使用ETL工具Kettle的实例](https://gitee.com/shenzhanwang/Kettle-demo) 21. Git指南和分支管理策略 22. 使用Apache Doris搭建实时数仓 23. [zookeeper原理、架构、使用场景和可视化](https://gitee.com/shenzhanwang/zookeeper-practice) 24. Spring boot整合Apache dubbo v2.7.5实现分布式服务治理(SOA架构)  25. 使用Spring Cloud Alibaba v2.2.7实现微服务架构(MSA架构) 26. 使用Apache Paimon搭建流式数据湖 27. 使用kubernetes+docker+gitlab+spring cloud实现云服务的编排、持续集成和动态扩容 28. 使用Spark进行分布式计算 29. 使用Flink实现流批一体化的分布式计算 30. 搭建高可用nginx集群和Tomcat负载均衡 31. 使用mycat实现Mysql数据库的主从复制、读写分离、分表分库、负载均衡和高可用 32. [《Elasticsearch数据搜索与分析实战》源码](https://gitee.com/shenzhanwang/Spring-elastic_search)  33. 基于可靠消息最终一致性实现分布式事务(activeMQ) 34. Spring boot dubbo整合seata实现分布式事务 35. Spring cloud alibaba 整合seata实现分布式事务  36. 并发控制:数据库锁机制和事务隔离级别的实现 37. 并发控制:使用redission实现分布式锁 38. 并发控制:使用zookeeper实现分布式锁 39. 并发控制:Java多线程编程实例 40. 并发控制:使用netty实现高性能NIO通信 ### 关注微信公众号获取更多技术文章和源码 