2021
03-23
03-23
spring boot集成mongodb的增删改查的示例代码
添加依赖<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-mongodb</artifactId></dependency>properties配置spring.data.mongodb.host=127.0.0.1spring.data.mongodb.port=27017spring.data.mongodb.database=enterprise_dc_dbspring.data.mongodb.username=enterprise_dc_dbaspring.data.mongodb.password=123456server.port=8081创建实体类@Document为mongodb集合名packag...
继续阅读 >