pull/35015/head
Phillip Webb 2 years ago
parent 00dc942e94
commit 053c968fb4

@ -648,7 +648,6 @@ class ReactiveOAuth2ResourceServerAutoConfigurationTests {
}
static Jwt.Builder jwt() {
// @formatter:off
return Jwt.withTokenValue("token")
.header("alg", "none")
.expiresAt(Instant.MAX)
@ -657,7 +656,6 @@ class ReactiveOAuth2ResourceServerAutoConfigurationTests {
.jti("jti")
.notBefore(Instant.MIN)
.subject("mock-test-subject");
// @formatter:on
}
@EnableWebFluxSecurity

@ -664,7 +664,6 @@ class OAuth2ResourceServerAutoConfigurationTests {
}
static Jwt.Builder jwt() {
// @formatter:off
return Jwt.withTokenValue("token")
.header("alg", "none")
.expiresAt(Instant.MAX)
@ -673,7 +672,6 @@ class OAuth2ResourceServerAutoConfigurationTests {
.jti("jti")
.notBefore(Instant.MIN)
.subject("mock-test-subject");
// @formatter:on
}
@Configuration(proxyBeanMethods = false)

@ -31,14 +31,12 @@ public class MyCustomObservation {
}
public void doSomething() {
// @formatter:off
Observation.createNotStarted("doSomething", this.observationRegistry)
.lowCardinalityKeyValue("locale", "en-US")
.highCardinalityKeyValue("userId", "42")
.observe(() -> {
// Execute business logic here
});
// @formatter:on
}
}

@ -36,11 +36,9 @@ public class MyBean {
// tag::method[]
public List<GregorianCalendar> authorsBornAfter1980() {
// @formatter:off
return this.create.selectFrom(AUTHOR)
.where(AUTHOR.DATE_OF_BIRTH.greaterThan(new GregorianCalendar(1980, 0, 1)))
.fetch(AUTHOR.DATE_OF_BIRTH);
// @formatter:on
} // end::method[]
}

@ -26,13 +26,11 @@ class MyConditionEvaluationReportingTests {
@Test
void autoConfigTest() {
// @formatter:off
new ApplicationContextRunner()
.withInitializer(ConditionEvaluationReportLoggingListener.forLogLevel(LogLevel.INFO))
.run((context) -> {
// Test something...
});
// @formatter:on
}
}

@ -22,15 +22,12 @@ import org.springframework.boot.builder.SpringApplicationBuilder;
public class MyApplication {
public void hierarchyWithDisabledBanner(String[] args) {
// @formatter:off
// tag::code[]
new SpringApplicationBuilder()
.sources(Parent.class)
new SpringApplicationBuilder().sources(Parent.class)
.child(Application.class)
.bannerMode(Banner.Mode.OFF)
.run(args);
// end::code[]
// @formatter:on
}
static class Parent {

@ -37,11 +37,9 @@ class MyUserDocumentationTests {
@Test
void listUsers() throws Exception {
// @formatter:off
this.mvc.perform(get("/users").accept(MediaType.TEXT_PLAIN))
.andExpect(status().isOk())
.andDo(document("list-users"));
// @formatter:on
}
}

Loading…
Cancel
Save