Excluding AutoConfigureTestDatabase from MybatisTest not working

132 Views Asked by At

I'm trying to configure a Spring Boot application that uses MyBatis in order to run the tests for the mappers. I see there is a MybatisTest annotation that may be useful...but it does autoconfigure an embedded datasource

I noticed the annotation declares an excludeAutoConfiguration parameter. I went ahead and set it with AutoConfigureTestDatabase, but it doesn't do anything. Documentation states Auto-configuration exclusions that should be applied for this test. so it should work.

Why wouldn't excludeAutoConfiguration work in this case?

I know the autoconfigured embedded datasource can be disabled using @AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE), but I'm trying to do the same while using only the MybatisTest annotation, e.g.: @MybatisTest(excludeAutoConfiguration = AutoConfigureTestDatabase.class).

0

There are 0 best solutions below