Skip to content
Closed

Polish #44148

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ include::partial$rest/actuator/quartz/trigger-job/http-response.adoc[]
=== Request Structure

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

[cols="2,1,3"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
{
"name": "management.endpoints.access.max-permitted",
"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).'",
"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).'",
"defaultValue": "unrestricted"
},
{
Expand Down Expand Up @@ -2107,7 +2107,7 @@
},
{
"name": "management.server.ssl.bundle",
"description": "The name of a configured SSL bundle."
"description": "Name of a configured SSL bundle."
},
{
"name": "management.server.ssl.certificate",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,9 @@ public String getClassName() {
}

/**
* Description of a triggered on demand {@link Job Quartz Job}.
* Description of a triggered on-demand {@link Job Quartz Job}.
*
* @since 3.5.0
*/
public static final class QuartzJobTriggerDescriptor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ public WebEndpointResponse<Object> quartzJobOrTrigger(SecurityContext securityCo
() -> this.delegate.quartzTrigger(group, name, showUnsanitized));
}

/**
* Trigger a Quartz job.
* @param jobs path segment "jobs"
* @param group job's group
* @param name job name
* @param state desired state
* @return web endpoint response
* @throws SchedulerException if there is an error triggering the job
* @since 3.5.0
*/
@WriteOperation
public WebEndpointResponse<Object> triggerQuartzJob(@Selector String jobs, @Selector String group,
@Selector String name, String state) throws SchedulerException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ void quartzJobShouldBeTriggered() throws SchedulerException {
}

@Test
void quartzJobShouldNotBeTriggeredJobDoesNotExist() throws SchedulerException {
void quartzJobShouldNotBeTriggeredWhenJobDoesNotExist() throws SchedulerException {
QuartzJobTriggerDescriptor quartzJobTriggerDescriptor = this.endpoint.triggerQuartzJob("samples", "hello");
assertThat(quartzJobTriggerDescriptor).isNull();
then(this.scheduler).should(never()).triggerJob(any());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/**
* Container annotation that aggregates several
* {@link ConditionalOnProperty @ConditionalOnProperty} annotations.
* {@link ConditionalOnBooleanProperty @ConditionalOnBooleanProperty} annotations.
*
* @author Phillip Webb
* @since 3.5.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ private Stream<MergedAnnotation<Annotation>> streamRepeated(MergedAnnotation<Ann
}

private Stream<MergedAnnotation<Annotation>> stream(MergedAnnotations annotations,
Class<? extends Annotation> containerType) {
return annotations.stream(containerType.getName())
Class<? extends Annotation> type) {
return annotations.stream(type.getName())
.filter(MergedAnnotationPredicates.unique(MergedAnnotation::getMetaTypes));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
},
{
"name": "server.ssl.bundle",
"description": "The name of a configured SSL bundle."
"description": "Name of a configured SSL bundle."
},
{
"name": "server.ssl.certificate",
Expand Down Expand Up @@ -2606,7 +2606,7 @@
},
{
"name": "spring.rsocket.server.ssl.bundle",
"description": "The name of a configured SSL bundle."
"description": "Name of a configured SSL bundle."
},
{
"name": "spring.rsocket.server.ssl.certificate",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.assertj.core.api.InstanceOfAssertFactory;
import org.assertj.core.api.ObjectAssert;
import org.junit.jupiter.api.Test;
import reactor.core.publisher.Mono;

import org.springframework.beans.factory.BeanCreationException;
import org.springframework.boot.autoconfigure.AutoConfigurations;
Expand All @@ -48,7 +47,6 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.r2dbc.core.DatabaseClient;
import org.springframework.test.util.ReflectionTestUtils;

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

Expand Down Expand Up @@ -98,9 +96,10 @@ void configureWithUrlAndPoolPropertiesApplyProperties() {
assertThat(poolMetrics.getMaxAllocatedSize()).isEqualTo(15);
assertThat(connectionPool).hasFieldOrPropertyWithValue("maxAcquireTime", Duration.ofMinutes(3));
assertThat(connectionPool).hasFieldOrPropertyWithValue("maxValidationTime", Duration.ofSeconds(1));
Mono<?> create = (Mono<?>) ReflectionTestUtils.getField(connectionPool, "create");
assertThat(create.getClass().getName()).endsWith("MonoRetry");
assertThat(create).hasFieldOrPropertyWithValue("times", 5L);
assertThat(connectionPool).extracting("create").satisfies((mono) -> {
assertThat(mono.getClass().getName()).endsWith("MonoRetry");
assertThat(mono).hasFieldOrPropertyWithValue("times", 5L);
});
}
finally {
connectionPool.close().block();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ logging:
----

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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
class FixedTrustManagerFactoryTests {

@Test
void shouldReturnTrustmanagers() throws Exception {
void shouldReturnTrustManagers() throws Exception {
TrustManager trustManager1 = mock(TrustManager.class);
TrustManager trustManager2 = mock(TrustManager.class);
FixedTrustManagerFactory factory = FixedTrustManagerFactory.of(getDefaultTrustManagerFactory(), trustManager1,
Expand Down