diff --git a/mybatis-spring-boot-autoconfigure/src/test/java/org/mybatis/spring/boot/autoconfigure/MybatisAutoConfigurationTest.java b/mybatis-spring-boot-autoconfigure/src/test/java/org/mybatis/spring/boot/autoconfigure/MybatisAutoConfigurationTest.java index 5dc7aa335..77a8e413d 100644 --- a/mybatis-spring-boot-autoconfigure/src/test/java/org/mybatis/spring/boot/autoconfigure/MybatisAutoConfigurationTest.java +++ b/mybatis-spring-boot-autoconfigure/src/test/java/org/mybatis/spring/boot/autoconfigure/MybatisAutoConfigurationTest.java @@ -307,10 +307,8 @@ void testWithCheckConfigLocationFileNotSpecify() { void testWithCheckConfigLocationFileDoesNotExists() { this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class) .withPropertyValues("mybatis.config-location:foo.xml", "mybatis.check-config-location=true") - .run(context -> assertThat(context).getFailure().isInstanceOf(BeanCreationException.class) - .hasMessageContainingAll( - "Error creating bean with name 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration':", - "Cannot find config location: class path resource [foo.xml] (please add config file or check your Mybatis configuration)")); + .run(context -> assertThat(context).getFailure().isInstanceOf(BeanCreationException.class).hasMessageContaining( + "Cannot find config location: class path resource [foo.xml] (please add config file or check your Mybatis configuration)")); } @Test