Merge branch '3.0.x' into 3.1.x
This commit is contained in:
@@ -113,13 +113,11 @@ public class JobLauncherApplicationRunner
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
if (this.jobs.size() > 1 && !StringUtils.hasText(this.jobName)) {
|
||||
throw new IllegalArgumentException("Job name must be specified in case of multiple jobs");
|
||||
}
|
||||
Assert.isTrue(this.jobs.size() <= 1 || StringUtils.hasText(this.jobName),
|
||||
"Job name must be specified in case of multiple jobs");
|
||||
if (StringUtils.hasText(this.jobName)) {
|
||||
if (!isLocalJob(this.jobName) && !isRegisteredJob(this.jobName)) {
|
||||
throw new IllegalArgumentException("No job found with name '" + this.jobName + "'");
|
||||
}
|
||||
Assert.isTrue(isLocalJob(this.jobName) || isRegisteredJob(this.jobName),
|
||||
() -> "No job found with name '" + this.jobName + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2023 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2023 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2023 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.
|
||||
|
||||
@@ -267,9 +267,7 @@ public class LogbackLoggingSystem extends AbstractLoggingSystem implements BeanF
|
||||
}
|
||||
IllegalStateException ex = new IllegalStateException(
|
||||
String.format("Logback configuration error detected: %n%s", errors));
|
||||
for (Throwable suppressedException : suppressedExceptions) {
|
||||
ex.addSuppressed(suppressedException);
|
||||
}
|
||||
suppressedExceptions.forEach(ex::addSuppressed);
|
||||
throw ex;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user