Spring @DataJpaTest with JUnit 5
问题 There doesn't seem to be a specific standard way I can find online that makes @DataJpaTest to run correctly. Is it true that @DataJpaTest is not being used nowadays and all tests are run at the service or controller level using @SpringBootTest ? @Repository public interface MyBeanRepository extends JpaRepository<MyBean, Long> { } @Configuration @EnableJpaRepositories("com.app.repository.*") @ComponentScan(basePackages = { "com.app.repository.*" }) public class ConfigurationRepository { }