0
I use postgresql, but for the tests I want to use the H2 database, how do I make spring recognize the H2 database for the tests? Create another application.properties by passing the H2 data? ***I’m using mybatis instead of JPA
spring.h2.console.path=/h2-console
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driver-class-name=org.h2.Driver ```
Enter the @Activeprofiles("test") annotation in your test class
– Jackson Alves