Skip to content
Discussion options

You must be logged in to vote

✅ 1. Graceful shutdown in latest Spring Boot

Yes — modern Spring Boot (2.3+ and fully in 3.x) has built-in graceful shutdown.

You just need to enable it:

server.shutdown=graceful
spring.lifecycle.timeout-per-shutdown-phase=30s
What it does:
Stops accepting new requests
Waits for active requests to finish
Then shuts down beans (like Mongo connections, thread pools)

👉 So yes, you don’t need custom code anymore — it’s built-in.

⚠️ 2. MongoDB issue (data going to test DB)

This is a very common issue, and you're right — it feels like a version mismatch, but it's usually configuration-related, not dependency mismatch.

🔴 Why data goes to test database?

MongoDB default behavior:

If no database is…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies

This comment was marked as off-topic.

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Ask and answer questions about GitHub features and usage Programming Help Discussions around programming languages, open source and software development Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community!
4 participants