4.7.0 Application always uses Embedded MongoDB regardless of configuration
See original GitHub issueMid development I upgraded my STS to the latest version and noticed an interesting side effect that each time I start an application from eclipse, it uses the embedded MongoDB regardless of the supplied configuration (we have dedicated MongoDB servers for development). If I remove the dependency to the embedded DB then it successfully connects to the remote DB. This also works if I use @ImportAutoConfiguration(exclude = EmbeddedMongoAutoConfiguration.class) however this sort of poses a problem for the integration tests.
I did check out this project to my laptop with an older STS and with the same run configuration it connects to the remote DB.
As for my project setup it`s a plain spring boot (v2.5.5) back end project. de.flapdoodle.embed.mongo is used for the embedded db with a test scope. Dependencies are handled by Maven.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
We fixed the default behavior for existing launch configs a while ago, so this should be working now out-of-the-box. If not, please comment and we can re-open this.
I beleave so, I think the ‘exclude test code’ behavior in Eclipse m2e has changed in the latest Eclipse and STS had to make some changes in boot launch to accomodate. The changes that we had to make was to switch on the ‘Exclude Test Code’ option by default. Unfortunately… defaults values for launch config attributes are set only when a launch config is created. Existing launch configs already have their options set and are persisted with whatever was set on them at creation time. So pre-existing launch configs will not have this option set.