diff --git a/pom.xml b/pom.xml index 9502b88197..e4c15fccac 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ org.mybatis mybatis-spring - 3.0.6-SNAPSHOT + 4.0.0-SNAPSHOT mybatis-spring An easy-to-use Spring bridge for MyBatis sql mapping framework. @@ -116,7 +116,7 @@ 3.5.19 7.0.1 4.0.0 - 5.2.4 + 6.0.0 org.mybatis.spring 6.0.1 diff --git a/src/main/java/org/mybatis/spring/batch/MyBatisBatchItemWriter.java b/src/main/java/org/mybatis/spring/batch/MyBatisBatchItemWriter.java index 9999275ba2..0015db9bd9 100644 --- a/src/main/java/org/mybatis/spring/batch/MyBatisBatchItemWriter.java +++ b/src/main/java/org/mybatis/spring/batch/MyBatisBatchItemWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,8 +24,8 @@ import org.mybatis.logging.Logger; import org.mybatis.logging.LoggerFactory; import org.mybatis.spring.SqlSessionTemplate; -import org.springframework.batch.item.Chunk; -import org.springframework.batch.item.ItemWriter; +import org.springframework.batch.infrastructure.item.Chunk; +import org.springframework.batch.infrastructure.item.ItemWriter; import org.springframework.beans.factory.InitializingBean; import org.springframework.core.convert.converter.Converter; import org.springframework.dao.EmptyResultDataAccessException; diff --git a/src/main/java/org/mybatis/spring/batch/MyBatisCursorItemReader.java b/src/main/java/org/mybatis/spring/batch/MyBatisCursorItemReader.java index 8bc0b3330c..520463ede7 100644 --- a/src/main/java/org/mybatis/spring/batch/MyBatisCursorItemReader.java +++ b/src/main/java/org/mybatis/spring/batch/MyBatisCursorItemReader.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2022 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import org.apache.ibatis.session.ExecutorType; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; -import org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader; +import org.springframework.batch.infrastructure.item.support.AbstractItemCountingItemStreamItemReader; import org.springframework.beans.factory.InitializingBean; /** diff --git a/src/main/java/org/mybatis/spring/batch/MyBatisPagingItemReader.java b/src/main/java/org/mybatis/spring/batch/MyBatisPagingItemReader.java index c459c39c59..1ef247a6ba 100644 --- a/src/main/java/org/mybatis/spring/batch/MyBatisPagingItemReader.java +++ b/src/main/java/org/mybatis/spring/batch/MyBatisPagingItemReader.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2022 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import org.mybatis.spring.SqlSessionTemplate; -import org.springframework.batch.item.database.AbstractPagingItemReader; +import org.springframework.batch.infrastructure.item.database.AbstractPagingItemReader; /** * {@code org.springframework.batch.item.ItemReader} for reading database records using MyBatis in a paging fashion. diff --git a/src/test/java/org/mybatis/spring/batch/MyBatisBatchItemWriterTest.java b/src/test/java/org/mybatis/spring/batch/MyBatisBatchItemWriterTest.java index c38083996d..d14262b3bb 100644 --- a/src/test/java/org/mybatis/spring/batch/MyBatisBatchItemWriterTest.java +++ b/src/test/java/org/mybatis/spring/batch/MyBatisBatchItemWriterTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ import org.mockito.MockitoAnnotations; import org.mybatis.spring.SqlSessionTemplate; import org.mybatis.spring.batch.domain.Employee; -import org.springframework.batch.item.Chunk; +import org.springframework.batch.infrastructure.item.Chunk; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.dao.InvalidDataAccessResourceUsageException; diff --git a/src/test/java/org/mybatis/spring/batch/MyBatisCursorItemReaderTest.java b/src/test/java/org/mybatis/spring/batch/MyBatisCursorItemReaderTest.java index 965fa84336..fbaf4b3c85 100644 --- a/src/test/java/org/mybatis/spring/batch/MyBatisCursorItemReaderTest.java +++ b/src/test/java/org/mybatis/spring/batch/MyBatisCursorItemReaderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,8 +31,8 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import org.springframework.batch.item.ExecutionContext; -import org.springframework.batch.item.ItemStreamException; +import org.springframework.batch.infrastructure.item.ExecutionContext; +import org.springframework.batch.infrastructure.item.ItemStreamException; /** * Tests for {@link MyBatisCursorItemReader}. diff --git a/src/test/java/org/mybatis/spring/batch/SpringBatchTest.java b/src/test/java/org/mybatis/spring/batch/SpringBatchTest.java index f2eb2034d4..76ee5a1e34 100644 --- a/src/test/java/org/mybatis/spring/batch/SpringBatchTest.java +++ b/src/test/java/org/mybatis/spring/batch/SpringBatchTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ import org.apache.ibatis.session.SqlSession; import org.junit.jupiter.api.Test; import org.mybatis.spring.batch.domain.Employee; -import org.springframework.batch.item.Chunk; +import org.springframework.batch.infrastructure.item.Chunk; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; diff --git a/src/test/java/org/mybatis/spring/batch/builder/MyBatisBatchItemWriterBuilderTest.java b/src/test/java/org/mybatis/spring/batch/builder/MyBatisBatchItemWriterBuilderTest.java index a39fc45e93..08c1a0a6b5 100644 --- a/src/test/java/org/mybatis/spring/batch/builder/MyBatisBatchItemWriterBuilderTest.java +++ b/src/test/java/org/mybatis/spring/batch/builder/MyBatisBatchItemWriterBuilderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +38,7 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.mybatis.spring.SqlSessionTemplate; -import org.springframework.batch.item.Chunk; +import org.springframework.batch.infrastructure.item.Chunk; /** * Tests for {@link MyBatisBatchItemWriterBuilder}. diff --git a/src/test/java/org/mybatis/spring/batch/builder/MyBatisCursorItemReaderBuilderTest.java b/src/test/java/org/mybatis/spring/batch/builder/MyBatisCursorItemReaderBuilderTest.java index dbad275cd8..5cc91f21f1 100644 --- a/src/test/java/org/mybatis/spring/batch/builder/MyBatisCursorItemReaderBuilderTest.java +++ b/src/test/java/org/mybatis/spring/batch/builder/MyBatisCursorItemReaderBuilderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import org.springframework.batch.item.ExecutionContext; +import org.springframework.batch.infrastructure.item.ExecutionContext; /** * Tests for {@link MyBatisCursorItemReaderBuilder}. diff --git a/src/test/java/org/mybatis/spring/batch/builder/MyBatisPagingItemReaderBuilderTest.java b/src/test/java/org/mybatis/spring/batch/builder/MyBatisPagingItemReaderBuilderTest.java index e1f1961f04..7806da99dc 100644 --- a/src/test/java/org/mybatis/spring/batch/builder/MyBatisPagingItemReaderBuilderTest.java +++ b/src/test/java/org/mybatis/spring/batch/builder/MyBatisPagingItemReaderBuilderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import org.springframework.batch.item.ExecutionContext; +import org.springframework.batch.infrastructure.item.ExecutionContext; /** * Tests for {@link MyBatisPagingItemReaderBuilder}. diff --git a/src/test/java/org/mybatis/spring/sample/AbstractSampleJobTest.java b/src/test/java/org/mybatis/spring/sample/AbstractSampleJobTest.java index b076e29469..8741445b32 100644 --- a/src/test/java/org/mybatis/spring/sample/AbstractSampleJobTest.java +++ b/src/test/java/org/mybatis/spring/sample/AbstractSampleJobTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.springframework.batch.core.Job; +import org.springframework.batch.core.job.Job; import org.springframework.batch.test.JobLauncherTestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; diff --git a/src/test/java/org/mybatis/spring/sample/batch/UserToPersonItemProcessor.java b/src/test/java/org/mybatis/spring/sample/batch/UserToPersonItemProcessor.java index b09e21f13d..0a00fc6628 100644 --- a/src/test/java/org/mybatis/spring/sample/batch/UserToPersonItemProcessor.java +++ b/src/test/java/org/mybatis/spring/sample/batch/UserToPersonItemProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import org.mybatis.spring.sample.domain.Person; import org.mybatis.spring.sample.domain.User; -import org.springframework.batch.item.ItemProcessor; +import org.springframework.batch.infrastructure.item.ItemProcessor; public class UserToPersonItemProcessor implements ItemProcessor { diff --git a/src/test/java/org/mybatis/spring/sample/config/SampleJobConfig.java b/src/test/java/org/mybatis/spring/sample/config/SampleJobConfig.java index 8c6fbd8e12..ed944a54c1 100644 --- a/src/test/java/org/mybatis/spring/sample/config/SampleJobConfig.java +++ b/src/test/java/org/mybatis/spring/sample/config/SampleJobConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2024 the original author or authors. + * Copyright 2010-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,15 +31,15 @@ import org.mybatis.spring.sample.batch.UserToPersonItemProcessor; import org.mybatis.spring.sample.domain.Person; import org.mybatis.spring.sample.domain.User; -import org.springframework.batch.core.Job; -import org.springframework.batch.core.Step; import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing; +import org.springframework.batch.core.job.Job; import org.springframework.batch.core.job.builder.JobBuilder; import org.springframework.batch.core.repository.JobRepository; +import org.springframework.batch.core.step.Step; import org.springframework.batch.core.step.builder.StepBuilder; -import org.springframework.batch.item.ItemProcessor; -import org.springframework.batch.item.ItemReader; -import org.springframework.batch.item.ItemWriter; +import org.springframework.batch.infrastructure.item.ItemProcessor; +import org.springframework.batch.infrastructure.item.ItemReader; +import org.springframework.batch.infrastructure.item.ItemWriter; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; diff --git a/src/test/resources/org/mybatis/spring/sample/config/applicationContext-job.xml b/src/test/resources/org/mybatis/spring/sample/config/applicationContext-job.xml index 0f25fba78d..b6423d874f 100644 --- a/src/test/resources/org/mybatis/spring/sample/config/applicationContext-job.xml +++ b/src/test/resources/org/mybatis/spring/sample/config/applicationContext-job.xml @@ -1,7 +1,7 @@