|
1 | 1 | /*
|
2 |
| - * Copyright 2010-2023 the original author or authors. |
| 2 | + * Copyright 2010-2024 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
67 | 67 | import org.mybatis.spring.type.SuperType;
|
68 | 68 | import org.mybatis.spring.type.TypeHandlerFactory;
|
69 | 69 | import org.springframework.core.io.ClassPathResource;
|
| 70 | +import org.springframework.core.io.Resource; |
70 | 71 |
|
71 | 72 | class SqlSessionFactoryBeanTest {
|
72 | 73 |
|
@@ -274,8 +275,7 @@ void testNullConfigLocation() throws Exception {
|
274 | 275 | void testSetConfigLocation() throws Exception {
|
275 | 276 | setupFactoryBean();
|
276 | 277 |
|
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")); |
279 | 279 |
|
280 | 280 | SqlSessionFactory factory = factoryBean.getObject();
|
281 | 281 |
|
@@ -304,8 +304,7 @@ void testSpecifyConfigurationAndConfigLocation() throws Exception {
|
304 | 304 | setupFactoryBean();
|
305 | 305 |
|
306 | 306 | 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")); |
309 | 308 |
|
310 | 309 | Throwable e = assertThrows(IllegalStateException.class, factoryBean::getObject);
|
311 | 310 | assertThat(e.getMessage())
|
@@ -344,7 +343,7 @@ void testEmptyMapperLocations() throws Exception {
|
344 | 343 | @Test
|
345 | 344 | void testMapperLocationsWithNullEntry() throws Exception {
|
346 | 345 | setupFactoryBean();
|
347 |
| - factoryBean.setMapperLocations(new org.springframework.core.io.Resource[] { null }); |
| 346 | + factoryBean.setMapperLocations(new Resource[] { null }); |
348 | 347 |
|
349 | 348 | assertDefaultConfig(factoryBean.getObject());
|
350 | 349 | }
|
|
0 commit comments