Learn mongo in Docker

  1. 本示例所依赖的 mongo db 运行在 docker上,请按照如下步骤配置 docker
    • 获取 mongo 镜像

      docker pull mongo

  1. Start spring io Start Spring io

  2. pom.xml

     <dependency>
         <groupId>org.joda</groupId>
         <artifactId>joda-money</artifactId>
         <version>1.0.1</version>
     </dependency>
    
  3. Maven clean and install Maven Clean and Install

  4. Maven reload project Maven Reload Project

  5. 在 application.properties 中添加如下配置:

     spring.data.mongodb.uri=mongodb://springbucks:springbucks@localhost:27017/springbucks