Skip to content

Commit d6c9e17

Browse files
committed
[ci] Use imports property
1 parent b777948 commit d6c9e17

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/test/java/org/mybatis/spring/SqlSessionFactoryBeanTest.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2023 the original author or authors.
2+
* Copyright 2010-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -67,6 +67,7 @@
6767
import org.mybatis.spring.type.SuperType;
6868
import org.mybatis.spring.type.TypeHandlerFactory;
6969
import org.springframework.core.io.ClassPathResource;
70+
import org.springframework.core.io.Resource;
7071

7172
class SqlSessionFactoryBeanTest {
7273

@@ -274,8 +275,7 @@ void testNullConfigLocation() throws Exception {
274275
void testSetConfigLocation() throws Exception {
275276
setupFactoryBean();
276277

277-
factoryBean
278-
.setConfigLocation(new org.springframework.core.io.ClassPathResource("org/mybatis/spring/mybatis-config.xml"));
278+
factoryBean.setConfigLocation(new ClassPathResource("org/mybatis/spring/mybatis-config.xml"));
279279

280280
SqlSessionFactory factory = factoryBean.getObject();
281281

@@ -304,8 +304,7 @@ void testSpecifyConfigurationAndConfigLocation() throws Exception {
304304
setupFactoryBean();
305305

306306
factoryBean.setConfiguration(new Configuration());
307-
factoryBean
308-
.setConfigLocation(new org.springframework.core.io.ClassPathResource("org/mybatis/spring/mybatis-config.xml"));
307+
factoryBean.setConfigLocation(new ClassPathResource("org/mybatis/spring/mybatis-config.xml"));
309308

310309
Throwable e = assertThrows(IllegalStateException.class, factoryBean::getObject);
311310
assertThat(e.getMessage())
@@ -344,7 +343,7 @@ void testEmptyMapperLocations() throws Exception {
344343
@Test
345344
void testMapperLocationsWithNullEntry() throws Exception {
346345
setupFactoryBean();
347-
factoryBean.setMapperLocations(new org.springframework.core.io.Resource[] { null });
346+
factoryBean.setMapperLocations(new Resource[] { null });
348347

349348
assertDefaultConfig(factoryBean.getObject());
350349
}

0 commit comments

Comments
 (0)