File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
spring-batch-core/src/main/java/org/springframework/batch/core/job Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2006-2022 the original author or authors.
2
+ * Copyright 2006-2025 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.
28
28
* @author Dave Syer
29
29
* @author Mahmoud Ben Hassine
30
30
*/
31
+ @ FunctionalInterface
31
32
public interface Job {
32
33
33
- String getName ();
34
+ /**
35
+ * The name of the job. This is used to distinguish between different jobs and must be
36
+ * unique within the job repository. If not explicitly set, the name will default to
37
+ * the fully qualified class name.
38
+ * @return the name of the job (never {@code null})
39
+ */
40
+ default String getName () {
41
+ return this .getClass ().getName ();
42
+ }
34
43
35
44
/**
36
45
* Flag to indicate if this job can be restarted, at least in principle.
You can’t perform that action at this time.
0 commit comments