Upgrade to Spring Java Format 0.0.38

Closes gh-890
This commit is contained in:
Andy Wilkinson
2023-05-11 17:51:45 +01:00
parent 24ad0a829f
commit e741790f02
142 changed files with 2994 additions and 2090 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2021 the original author or authors.
* Copyright 2014-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.
@@ -46,17 +46,18 @@ public class EveryTestPreprocessing {
@Before
public void setup() {
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
.apply(documentationConfiguration(this.restDocumentation).operationPreprocessors()
.withRequestDefaults(removeHeaders("Foo")) // <1>
.withResponseDefaults(prettyPrint())) // <2>
.build();
.apply(documentationConfiguration(this.restDocumentation).operationPreprocessors()
.withRequestDefaults(removeHeaders("Foo")) // <1>
.withResponseDefaults(prettyPrint())) // <2>
.build();
}
// end::setup[]
public void use() throws Exception {
// tag::use[]
this.mockMvc.perform(get("/")).andExpect(status().isOk())
.andDo(document("index", links(linkWithRel("self").description("Canonical self link"))));
this.mockMvc.perform(get("/"))
.andExpect(status().isOk())
.andDo(document("index", links(linkWithRel("self").description("Canonical self link"))));
// end::use[]
}