File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
spring-batch-core/src/main/java/org/springframework/batch/core/step Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2006-2022 the original author or authors.
2+ * Copyright 2006-2025 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.
2727 * @author Mahmoud Ben Hassine
2828 *
2929 */
30+ @ FunctionalInterface
3031public interface Step {
3132
3233 /**
@@ -35,9 +36,14 @@ public interface Step {
3536 String STEP_TYPE_KEY = "batch.stepType" ;
3637
3738 /**
38- * @return the name of this step.
39+ * The name of the step. This is used to distinguish between different steps and must
40+ * be unique within a job. If not explicitly set, the name will default to the fully
41+ * qualified class name.
42+ * @return the name of the step (never {@code null})
3943 */
40- String getName ();
44+ default String getName () {
45+ return this .getClass ().getName ();
46+ }
4147
4248 /**
4349 * @return {@code true} if a step that is already marked as complete can be started
You can’t perform that action at this time.
0 commit comments