Spring Boot中使用MongoDB數據庫

本章咱們來學習Spring Boot中使用MongoDB數據庫,有兩種使用方式,一是直接使用mongotemplate,二是新建實體相關的repository接口。css 引入依賴 在pom.xml中加入spring-boot-starter-data-mongodb引入對mongodb的訪問支持依賴,它的實現依賴spring-data-mongodb。java <dependency>
相關文章
相關標籤/搜索