To perform integration testing using JUnit 5 with SpringBoot use TestContainers https://testcontainers.com/desktop/
Refer :
Using Maven you can add the following to dependencyManagement section in your pom.xml:
https://java.testcontainers.org/
The following example shows how to create a MongoDBContainer:
https://java.testcontainers.org/modules/databases/mongodb/
Add the following dependency to your pom.xml/build.gradle file:
https://java.testcontainers.org/test_framework_integration/junit_5/#adding-testcontainers-junit-5-support-to-your-project-dependencies
For More info please refer below links:
https://www.freecodecamp.org/news/integration-testing-using-junit-5-testcontainers-with-springboot-example/
https://www.youtube.com/watch?v=zfN8m9Dh9cs