Mongo tries to connect automatically to port 27017(localhost)

后端 未结 4 1598
小鲜肉
小鲜肉 2020-12-05 23:14

I am using Spring Rest and Mongo in Maven to make a web service that connects to a server. The problem is that I haven\'t written any code for Mongo and it is trying to conn

4条回答
  •  Happy的楠姐
    2020-12-05 23:57

    In some cases, if you are using reactive you also need to remove MongoReactiveAutoConfiguration

    spring:
      autoconfigure:
        exclude:
          - org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration
          - org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration
    

提交回复
热议问题