Skip to content

Commit 9497cdf

Browse files
committed
Polish
Signed-off-by: Johnny Lim <[email protected]>
1 parent 1e73a7c commit 9497cdf

File tree

11 files changed

+28
-17
lines changed

11 files changed

+28
-17
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/docs/antora/modules/api/pages/rest/actuator/quartz.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ include::partial$rest/actuator/quartz/trigger-job/http-response.adoc[]
176176
=== Request Structure
177177

178178
The request specifies a desired `state` associated with a particular job.
179-
Sending an HTTP Request with a `"state": "running"` body indicates that the job should be run now.
179+
Sending an HTTP request with a `"state": "running"` body indicates that the job should be run now.
180180
The following table describes the structure of the request:
181181

182182
[cols="2,1,3"]

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
},
6565
{
6666
"name": "management.endpoints.access.max-permitted",
67-
"description": "The maximum level of endpoint access that is permitted. Caps an endpoint's individual access level (management.endpoint.<id>.access) and the default access (management.endpoints.access.default).'",
67+
"description": "Maximum level of endpoint access that is permitted. Caps an endpoint's individual access level (management.endpoint.<id>.access) and the default access (management.endpoints.access.default).'",
6868
"defaultValue": "unrestricted"
6969
},
7070
{
@@ -2107,7 +2107,7 @@
21072107
},
21082108
{
21092109
"name": "management.server.ssl.bundle",
2110-
"description": "The name of a configured SSL bundle."
2110+
"description": "Name of a configured SSL bundle."
21112111
},
21122112
{
21132113
"name": "management.server.ssl.certificate",

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/quartz/QuartzEndpoint.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,9 @@ public String getClassName() {
409409
}
410410

411411
/**
412-
* Description of a triggered on demand {@link Job Quartz Job}.
412+
* Description of a triggered on-demand {@link Job Quartz Job}.
413+
*
414+
* @since 3.5.0
413415
*/
414416
public static final class QuartzJobTriggerDescriptor {
415417

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/quartz/QuartzEndpointWebExtension.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@ public WebEndpointResponse<Object> quartzJobOrTrigger(SecurityContext securityCo
8080
() -> this.delegate.quartzTrigger(group, name, showUnsanitized));
8181
}
8282

83+
/**
84+
* Trigger a Quartz job.
85+
* @param jobs path segment "jobs"
86+
* @param group job's group
87+
* @param name job name
88+
* @param state desired state
89+
* @return web endpoint response
90+
* @throws SchedulerException if there is an error triggering the job
91+
* @since 3.5.0
92+
*/
8393
@WriteOperation
8494
public WebEndpointResponse<Object> triggerQuartzJob(@Selector String jobs, @Selector String group,
8595
@Selector String name, String state) throws SchedulerException {

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/quartz/QuartzEndpointTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ void quartzJobShouldBeTriggered() throws SchedulerException {
778778
}
779779

780780
@Test
781-
void quartzJobShouldNotBeTriggeredJobDoesNotExist() throws SchedulerException {
781+
void quartzJobShouldNotBeTriggeredWhenJobDoesNotExist() throws SchedulerException {
782782
QuartzJobTriggerDescriptor quartzJobTriggerDescriptor = this.endpoint.triggerQuartzJob("samples", "hello");
783783
assertThat(quartzJobTriggerDescriptor).isNull();
784784
then(this.scheduler).should(never()).triggerJob(any());

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnBooleanProperties.java

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

2727
/**
2828
* Container annotation that aggregates several
29-
* {@link ConditionalOnProperty @ConditionalOnProperty} annotations.
29+
* {@link ConditionalOnBooleanProperty @ConditionalOnBooleanProperty} annotations.
3030
*
3131
* @author Phillip Webb
3232
* @since 3.5.0

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnPropertyCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ private Stream<MergedAnnotation<Annotation>> streamRepeated(MergedAnnotation<Ann
8989
}
9090

9191
private Stream<MergedAnnotation<Annotation>> stream(MergedAnnotations annotations,
92-
Class<? extends Annotation> containerType) {
93-
return annotations.stream(containerType.getName())
92+
Class<? extends Annotation> type) {
93+
return annotations.stream(type.getName())
9494
.filter(MergedAnnotationPredicates.unique(MergedAnnotation::getMetaTypes));
9595
}
9696

spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
},
270270
{
271271
"name": "server.ssl.bundle",
272-
"description": "The name of a configured SSL bundle."
272+
"description": "Name of a configured SSL bundle."
273273
},
274274
{
275275
"name": "server.ssl.certificate",
@@ -2606,7 +2606,7 @@
26062606
},
26072607
{
26082608
"name": "spring.rsocket.server.ssl.bundle",
2609-
"description": "The name of a configured SSL bundle."
2609+
"description": "Name of a configured SSL bundle."
26102610
},
26112611
{
26122612
"name": "spring.rsocket.server.ssl.certificate",

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/r2dbc/R2dbcAutoConfigurationTests.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import org.assertj.core.api.InstanceOfAssertFactory;
3636
import org.assertj.core.api.ObjectAssert;
3737
import org.junit.jupiter.api.Test;
38-
import reactor.core.publisher.Mono;
3938

4039
import org.springframework.beans.factory.BeanCreationException;
4140
import org.springframework.boot.autoconfigure.AutoConfigurations;
@@ -48,7 +47,6 @@
4847
import org.springframework.context.annotation.Bean;
4948
import org.springframework.context.annotation.Configuration;
5049
import org.springframework.r2dbc.core.DatabaseClient;
51-
import org.springframework.test.util.ReflectionTestUtils;
5250

5351
import static org.assertj.core.api.Assertions.assertThat;
5452

@@ -98,9 +96,10 @@ void configureWithUrlAndPoolPropertiesApplyProperties() {
9896
assertThat(poolMetrics.getMaxAllocatedSize()).isEqualTo(15);
9997
assertThat(connectionPool).hasFieldOrPropertyWithValue("maxAcquireTime", Duration.ofMinutes(3));
10098
assertThat(connectionPool).hasFieldOrPropertyWithValue("maxValidationTime", Duration.ofSeconds(1));
101-
Mono<?> create = (Mono<?>) ReflectionTestUtils.getField(connectionPool, "create");
102-
assertThat(create.getClass().getName()).endsWith("MonoRetry");
103-
assertThat(create).hasFieldOrPropertyWithValue("times", 5L);
99+
assertThat(connectionPool).extracting("create").satisfies((mono) -> {
100+
assertThat(mono.getClass().getName()).endsWith("MonoRetry");
101+
assertThat(mono).hasFieldOrPropertyWithValue("times", 5L);
102+
});
104103
}
105104
finally {
106105
connectionPool.close().block();

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/logging.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ logging:
642642
----
643643

644644
TIP: For more advanced customizations, you can use the javadoc:org.springframework.boot.logging.structured.StructuredLoggingJsonMembersCustomizer[] interface.
645-
You can reference a one or more implementations using the configprop:logging.structured.json.customizer[] property.
645+
You can reference one or more implementations using the configprop:logging.structured.json.customizer[] property.
646646
You can also declare implementations by listing them in a `META-INF/spring.factories` file.
647647

648648

0 commit comments

Comments
 (0)