Giter Club home page Giter Club logo

duic-docker-compose's People

Contributors

harukama avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

duic-docker-compose's Issues

docker运行报错Connection strings must start with either 'mongodb://' or 'mongodb+srv://

mongodb已确定打开,配置文件确定读进去了(在yml写错误的语法会报yml错误),这是我的配置

spring:
  data:
    mongodb:
      uri: mongodb://172.17.0.1:27017/duic 
duic:
  root_email: [email protected]
  root_password: 123456
  jwt:
    secret: U2FsdGVkX1/jO0KlWumac4yDM8rOgWPkaV0KrSHDynWOP6n8FMJB9uSc8EW/qM+VagrMBAXGpyw=
    expires_in: 180

docker我是直接进入容器内部java -jar启动的,然后--spring.profiles.active=mysql启动依然是报mongo的错
报错

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mongodb.reactivestreams.client.MongoClient]: Factory method 'mongoClient' threw exception; nested exception is java.lang.IllegalArgumentException: The connection string is invalid. Connection strings must start with either 'mongodb://' or 'mongodb+srv://
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622)
        ... 82 common frames omitted
Caused by: java.lang.IllegalArgumentException: The connection string is invalid. Connection strings must start with either 'mongodb://' or 'mongodb+srv://
        at com.mongodb.ConnectionString.<init>(ConnectionString.java:273)
        at com.mongodb.reactivestreams.client.MongoClients.create(MongoClients.java:62)
        at io.zhudy.duic.repository.config.MongoConfiguration.mongoClient(MongoConfiguration.kt:50)
        at io.zhudy.duic.repository.config.MongoConfiguration$$EnhancerBySpringCGLIB$$e5377639.CGLIB$mongoClient$2(<generated>)
        at io.zhudy.duic.repository.config.MongoConfiguration$$EnhancerBySpringCGLIB$$e5377639$$FastClassBySpringCGLIB$$95406f9f.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
        at io.zhudy.duic.repository.config.MongoConfiguration$$EnhancerBySpringCGLIB$$e5377639.mongoClient(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
        ... 83 common frames omitted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.