Skip to content

Commit 0875802

Browse files
authored
Merge branch 'main' into GH-4826
Signed-off-by: Harry <43809168+minkukjo@users.noreply.github.com>
2 parents 2be4de9 + 673cfe3 commit 0875802

File tree

623 files changed

+1850
-1810
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

623 files changed

+1850
-1810
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterJob.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import java.lang.annotation.RetentionPolicy;
2222
import java.lang.annotation.Target;
2323

24-
import org.springframework.batch.core.Job;
25-
import org.springframework.batch.core.JobExecution;
24+
import org.springframework.batch.core.job.Job;
25+
import org.springframework.batch.core.job.JobExecution;
2626
import org.springframework.batch.core.listener.JobExecutionListener;
2727

2828
/**

spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterStep.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import java.lang.annotation.Target;
2323

2424
import org.springframework.batch.core.ExitStatus;
25-
import org.springframework.batch.core.Step;
26-
import org.springframework.batch.core.StepExecution;
25+
import org.springframework.batch.core.step.Step;
26+
import org.springframework.batch.core.step.StepExecution;
2727
import org.springframework.batch.core.listener.StepExecutionListener;
2828

2929
/**

spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeJob.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
import java.lang.annotation.RetentionPolicy;
2222
import java.lang.annotation.Target;
2323

24-
import org.springframework.batch.core.Job;
25-
import org.springframework.batch.core.JobExecution;
24+
import org.springframework.batch.core.job.Job;
25+
import org.springframework.batch.core.job.JobExecution;
2626
import org.springframework.batch.core.listener.JobExecutionListener;
27-
import org.springframework.batch.core.Step;
27+
import org.springframework.batch.core.step.Step;
2828
import org.springframework.beans.factory.annotation.Qualifier;
2929

3030
/**

spring-batch-core/src/main/java/org/springframework/batch/core/annotation/BeforeStep.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import java.lang.annotation.RetentionPolicy;
2222
import java.lang.annotation.Target;
2323

24-
import org.springframework.batch.core.Step;
25-
import org.springframework.batch.core.StepExecution;
24+
import org.springframework.batch.core.step.Step;
25+
import org.springframework.batch.core.step.StepExecution;
2626
import org.springframework.batch.core.listener.StepExecutionListener;
2727

2828
/**

spring-batch-core/src/main/java/org/springframework/batch/core/aot/CoreRuntimeHints.java

Lines changed: 44 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,22 @@
5151
import org.springframework.aot.hint.TypeReference;
5252
import org.springframework.batch.core.Entity;
5353
import org.springframework.batch.core.ExitStatus;
54-
import org.springframework.batch.core.JobExecution;
55-
import org.springframework.batch.core.JobInstance;
56-
import org.springframework.batch.core.JobParameter;
57-
import org.springframework.batch.core.JobParameters;
58-
import org.springframework.batch.core.StepContribution;
59-
import org.springframework.batch.core.StepExecution;
54+
import org.springframework.batch.core.job.JobExecution;
55+
import org.springframework.batch.core.job.JobInstance;
56+
import org.springframework.batch.core.job.parameters.JobParameter;
57+
import org.springframework.batch.core.job.parameters.JobParameters;
58+
import org.springframework.batch.core.launch.JobOperator;
59+
import org.springframework.batch.core.listener.ChunkListener;
60+
import org.springframework.batch.core.listener.ItemProcessListener;
61+
import org.springframework.batch.core.listener.ItemReadListener;
62+
import org.springframework.batch.core.listener.ItemWriteListener;
63+
import org.springframework.batch.core.listener.JobExecutionListener;
64+
import org.springframework.batch.core.listener.SkipListener;
65+
import org.springframework.batch.core.listener.StepExecutionListener;
66+
import org.springframework.batch.core.repository.JobRepository;
67+
import org.springframework.batch.core.repository.explore.JobExplorer;
68+
import org.springframework.batch.core.step.StepContribution;
69+
import org.springframework.batch.core.step.StepExecution;
6070
import org.springframework.batch.core.scope.context.JobContext;
6171
import org.springframework.batch.core.scope.context.StepContext;
6272
import org.springframework.batch.item.Chunk;
@@ -69,6 +79,8 @@
6979
* @author Glenn Renfro
7080
* @author Mahmoud Ben Hassine
7181
* @author Alexander Arshavskiy
82+
* @author Andrey Litvitski
83+
* @author François Martin
7284
* @since 5.0
7385
*/
7486
public class CoreRuntimeHints implements RuntimeHintsRegistrar {
@@ -83,66 +95,47 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
8395
"java.util.concurrent.ConcurrentHashMap$Segment");
8496

8597
// resource hints
86-
hints.resources().registerPattern("org/springframework/batch/core/schema-h2.sql");
87-
hints.resources().registerPattern("org/springframework/batch/core/schema-derby.sql");
88-
hints.resources().registerPattern("org/springframework/batch/core/schema-hsqldb.sql");
89-
hints.resources().registerPattern("org/springframework/batch/core/schema-sqlite.sql");
90-
hints.resources().registerPattern("org/springframework/batch/core/schema-db2.sql");
91-
hints.resources().registerPattern("org/springframework/batch/core/schema-hana.sql");
92-
hints.resources().registerPattern("org/springframework/batch/core/schema-mysql.sql");
93-
hints.resources().registerPattern("org/springframework/batch/core/schema-mariadb.sql");
94-
hints.resources().registerPattern("org/springframework/batch/core/schema-oracle.sql");
95-
hints.resources().registerPattern("org/springframework/batch/core/schema-postgresql.sql");
96-
hints.resources().registerPattern("org/springframework/batch/core/schema-sqlserver.sql");
97-
hints.resources().registerPattern("org/springframework/batch/core/schema-sybase.sql");
98+
hints.resources()
99+
.registerPattern(
100+
"org/springframework/batch/core/schema-{h2,derby,hsqldb,sqlite,db2,hana,mysql,mariadb,oracle,postgresql,sqlserver,sybase}.sql");
98101

99102
// proxy hints
100103
hints.proxies()
101-
.registerJdkProxy(builder -> builder
102-
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.StepExecutionListener"))
104+
.registerJdkProxy(builder -> builder.proxiedInterfaces(TypeReference.of(StepExecutionListener.class))
103105
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
104-
.registerJdkProxy(builder -> builder
105-
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.ItemReadListener"))
106+
.registerJdkProxy(builder -> builder.proxiedInterfaces(TypeReference.of(ItemReadListener.class))
106107
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
107-
.registerJdkProxy(builder -> builder
108-
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.ItemProcessListener"))
108+
.registerJdkProxy(builder -> builder.proxiedInterfaces(TypeReference.of(ItemProcessListener.class))
109109
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
110-
.registerJdkProxy(builder -> builder
111-
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.ItemWriteListener"))
110+
.registerJdkProxy(builder -> builder.proxiedInterfaces(TypeReference.of(ItemWriteListener.class))
112111
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
113-
.registerJdkProxy(builder -> builder
114-
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.ChunkListener"))
112+
.registerJdkProxy(builder -> builder.proxiedInterfaces(TypeReference.of(ChunkListener.class))
115113
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
116-
.registerJdkProxy(builder -> builder
117-
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.SkipListener"))
114+
.registerJdkProxy(builder -> builder.proxiedInterfaces(TypeReference.of(SkipListener.class))
118115
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
119-
.registerJdkProxy(builder -> builder
120-
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.JobExecutionListener"))
116+
.registerJdkProxy(builder -> builder.proxiedInterfaces(TypeReference.of(JobExecutionListener.class))
121117
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
122-
.registerJdkProxy(builder -> builder
123-
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.repository.JobRepository"))
118+
.registerJdkProxy(builder -> builder.proxiedInterfaces(TypeReference.of(JobRepository.class))
124119
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
125-
.registerJdkProxy(builder -> builder
126-
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.explore.JobExplorer"))
120+
.registerJdkProxy(builder -> builder.proxiedInterfaces(TypeReference.of(JobExplorer.class))
127121
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
128-
.registerJdkProxy(builder -> builder
129-
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.launch.JobOperator"))
122+
.registerJdkProxy(builder -> builder.proxiedInterfaces(TypeReference.of(JobOperator.class))
130123
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class));
131124

132125
// reflection hints
133-
hints.reflection().registerType(Types.class, MemberCategory.ACCESS_DECLARED_FIELDS);
134-
hints.reflection().registerType(JobContext.class, MemberCategory.INVOKE_PUBLIC_METHODS);
135-
hints.reflection().registerType(StepContext.class, MemberCategory.INVOKE_PUBLIC_METHODS);
136-
hints.reflection().registerType(JobParameter.class, MemberCategory.values());
137-
hints.reflection().registerType(JobParameters.class, MemberCategory.values());
138-
hints.reflection().registerType(ExitStatus.class, MemberCategory.values());
139-
hints.reflection().registerType(JobInstance.class, MemberCategory.values());
140-
hints.reflection().registerType(JobExecution.class, MemberCategory.values());
141-
hints.reflection().registerType(StepExecution.class, MemberCategory.values());
142-
hints.reflection().registerType(StepContribution.class, MemberCategory.values());
143-
hints.reflection().registerType(Entity.class, MemberCategory.values());
144-
hints.reflection().registerType(ExecutionContext.class, MemberCategory.values());
145-
hints.reflection().registerType(Chunk.class, MemberCategory.values());
126+
hints.reflection().registerType(Types.class);
127+
hints.reflection().registerType(JobContext.class);
128+
hints.reflection().registerType(StepContext.class);
129+
hints.reflection().registerType(JobParameter.class);
130+
hints.reflection().registerType(JobParameters.class);
131+
hints.reflection().registerType(ExitStatus.class);
132+
hints.reflection().registerType(JobInstance.class);
133+
hints.reflection().registerType(JobExecution.class);
134+
hints.reflection().registerType(StepExecution.class);
135+
hints.reflection().registerType(StepContribution.class);
136+
hints.reflection().registerType(Entity.class);
137+
hints.reflection().registerType(ExecutionContext.class);
138+
hints.reflection().registerType(Chunk.class);
146139
jdkTypes.stream()
147140
.map(TypeReference::of)
148141
.forEach(type -> hints.reflection().registerType(type, MemberCategory.values()));

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*/
1616
package org.springframework.batch.core.configuration;
1717

18-
import org.springframework.batch.core.Job;
19-
import org.springframework.batch.core.JobExecutionException;
18+
import org.springframework.batch.core.job.Job;
19+
import org.springframework.batch.core.job.JobExecutionException;
2020

2121
/**
2222
* Checked exception that indicates a name clash when registering {@link Job} instances.

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
package org.springframework.batch.core.configuration;
1717

18-
import org.springframework.batch.core.Job;
18+
import org.springframework.batch.core.job.Job;
1919

2020
/**
2121
* Strategy for creating a single job.

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobLocator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
package org.springframework.batch.core.configuration;
1717

18-
import org.springframework.batch.core.Job;
18+
import org.springframework.batch.core.job.Job;
1919
import org.springframework.batch.core.launch.NoSuchJobException;
2020
import org.springframework.lang.Nullable;
2121

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/JobRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import java.util.Collection;
1919

20-
import org.springframework.batch.core.Job;
20+
import org.springframework.batch.core.job.Job;
2121
import org.springframework.batch.core.launch.NoSuchJobException;
2222

2323
/**

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/StepRegistry.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
*/
1616
package org.springframework.batch.core.configuration;
1717

18-
import org.springframework.batch.core.Step;
18+
import org.springframework.batch.core.step.Step;
19+
import org.springframework.batch.core.job.Job;
1920
import org.springframework.batch.core.launch.NoSuchJobException;
2021
import org.springframework.batch.core.step.NoSuchStepException;
2122

2223
import java.util.Collection;
2324

2425
/**
25-
* Registry keeping track of all the {@link Step} instances defined in a
26-
* {@link org.springframework.batch.core.Job}.
26+
* Registry keeping track of all the {@link Step} instances defined in a {@link Job}.
2727
*
2828
* @author Sebastien Gerard
2929
* @author Stephane Nicoll

0 commit comments

Comments
 (0)