文章目录
在model中添加依赖,为什么在model中添加?因为会有映射的实体类MongoObject对应mongodb中的数据表对象:
1. 引入依赖
2. 在yml中添加配置
3. 在启动类中开启mongodb
在model中添加依赖,为什么在model中添加?因为会有映射的实体类MongoObject对应mongodb中的数据表对象:
SpringBoot整合Minio
Document(“t_his_curve_highway”) 表示这条记录Document插入MongoDB中的t_his_curve_highway的Collection中。@Field(“highway_id”)
新建一个springboot工程,pom.xml如下:<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sche...
创建选择NoSQLpom依赖: <!--mongodb依赖--> <dependency>
本篇博文主要讲述入使用springboot对MongoDB进行整合这里我们需要先安装配置MongoDB。在官网下载会比较慢,(反正我是比较慢啦,不知道各位的了)所以我特意提供了一下我下载好的安装包,以及补丁,还有一个可视化工具。地址在下方,有需要的可以前往下载。如果有不会的安装配置的可参考:MongoDB的安装配置此处说明一下,因为每个人的电脑环境电脑系统不一致,可能配置可以适当的缩减,就拿我来说
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M