Last active
February 26, 2021 13:47
-
-
Save gilbertolptn/fac0a3132219aec6e0bba9ed35e1f30c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@DataJpaTest | |
@ActiveProfiles("test") | |
/* | |
By default @DataJpaTest uses embeded h2 database and ignores the connection string declared in application.properties. | |
This annotation disables this behavior and db configured in bootstrap.yml will be used by @DataJpaTest test. | |
*/ | |
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) | |
@Sql("classpath:my_data.sql") | |
class MyRepositoryTest { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment