flapdoodle-oss / de.flapdoodle.embed.mongo.spring

embedded mongo spring integration
Apache License 2.0
30 stars 7 forks source link

conflict with configuration to real mongodb #10

Closed MarcoKnezevichInsiel closed 1 year ago

MarcoKnezevichInsiel commented 1 year ago

Hi, I try to following the example in documentation in order to test my repositories.

All works fine with the example, everything works fine until i set the parameters: spring.data.mongodb.uri spring.data.mongodb.database in spring boot file application.properties.

I have to set these parameters because they are needed by the application to work correctly, but by setting them, the connection to the real db is created and not to the embedded database

There is a way to set the embedded database to a specific url?

Thanks a lot

michaelmosmann commented 1 year ago

@MarcoKnezevichInsiel which spring version do you use?

MarcoKnezevichInsiel commented 1 year ago

@MarcoKnezevichInsiel which spring version do you use?

spring boot 3.0.0 and java 17

michaelmosmann commented 1 year ago

@MarcoKnezevichInsiel thanks.. i have to look into this .. spring 2.7.x had a hook where it "changed" the mongodb port to the test instance .. this hack is gone with spring 3.0.x .. i must see if i can fix this somehow..

michaelmosmann commented 1 year ago

@MarcoKnezevichInsiel .. i think this is the same issue: https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo.spring/issues/9

michaelmosmann commented 1 year ago

@MarcoKnezevichInsiel should be solved with 4.4.1 .. should be in maven central in some hours:) close if this works for you

MarcoKnezevichInsiel commented 1 year ago

Thanks a lot, it works fine! Cool!