Ensure PDF version of Reference Manual does not contain HTML <strong> tags
Prior to this commit, the PDF version of the Spring Reference Manual contained HTML <strong></strong> tags in code examples due to the fact that Asciidoctor converts bold formatting (i.e., elements wrapped in `**` or `*`) within source code blocks into HTML tags even for PDF rendering. This commit addresses this issue by removing all bold formatting from example code blocks. Closes gh-22577
This commit is contained in:
@@ -475,7 +475,7 @@ through the `syncBody` method, as the following example shows:
|
||||
|
||||
Mono<Void> result = client.post()
|
||||
.uri("/path", id)
|
||||
.syncBody(**builder.build()**)
|
||||
.syncBody(builder.build())
|
||||
.retrieve()
|
||||
.bodyToMono(Void.class);
|
||||
----
|
||||
|
||||
@@ -1339,7 +1339,7 @@ as the following example shows:
|
||||
[source,java,indent=0]
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
@PostMapping(path = "/pets", **consumes = "application/json"**)
|
||||
@PostMapping(path = "/pets", consumes = "application/json")
|
||||
public void addPet(@RequestBody Pet pet) {
|
||||
// ...
|
||||
}
|
||||
@@ -1368,7 +1368,7 @@ content types that a controller method produces, as the following example shows:
|
||||
[source,java,indent=0]
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
@GetMapping(path = "/pets/{petId}", **produces = "application/json;charset=UTF-8"**)
|
||||
@GetMapping(path = "/pets/{petId}", produces = "application/json;charset=UTF-8")
|
||||
@ResponseBody
|
||||
public Pet getPet(@PathVariable String petId) {
|
||||
// ...
|
||||
@@ -2023,7 +2023,7 @@ You can automatically apply validation after data binding by adding the
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
@PostMapping("/owners/{ownerId}/pets/{petId}/edit")
|
||||
public String processSubmit(**@Valid @ModelAttribute("pet") Pet pet**, BindingResult result) { <1>
|
||||
public String processSubmit(@Valid @ModelAttribute("pet") Pet pet, BindingResult result) { <1>
|
||||
if (result.hasErrors()) {
|
||||
return "petForm";
|
||||
}
|
||||
|
||||
@@ -2078,7 +2078,7 @@ The following example shows how to do so:
|
||||
// ...
|
||||
|
||||
@GetMapping
|
||||
public String setupForm(**@RequestParam("petId") int petId**, Model model) { <1>
|
||||
public String setupForm(@RequestParam("petId") int petId, Model model) { <1>
|
||||
Pet pet = this.clinic.loadPet(petId);
|
||||
model.addAttribute("pet", pet);
|
||||
return "petForm";
|
||||
@@ -2633,8 +2633,8 @@ probably want it deserialized from JSON (similar to `@RequestBody`). Use the
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
@PostMapping("/")
|
||||
public String handle(**@RequestPart("meta-data") MetaData metadata,
|
||||
@RequestPart("file-data") MultipartFile file**) {
|
||||
public String handle(@RequestPart("meta-data") MetaData metadata,
|
||||
@RequestPart("file-data") MultipartFile file) {
|
||||
// ...
|
||||
}
|
||||
----
|
||||
@@ -2652,8 +2652,8 @@ as the following example shows:
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
@PostMapping("/")
|
||||
public String handle(**@Valid** @RequestPart("meta-data") MetaData metadata,
|
||||
**BindingResult result**) {
|
||||
public String handle(@Valid @RequestPart("meta-data") MetaData metadata,
|
||||
BindingResult result) {
|
||||
// ...
|
||||
}
|
||||
----
|
||||
|
||||
@@ -1743,7 +1743,7 @@ The following example shows how to do so in Java configuration:
|
||||
|
||||
@Override
|
||||
public void configureMessageBroker(MessageBrokerRegistry registry) {
|
||||
registry.setPathMatcher(**new AntPathMatcher("."));**
|
||||
registry.setPathMatcher(new AntPathMatcher("."));
|
||||
registry.enableStompBrokerRelay("/queue", "/topic");
|
||||
registry.setApplicationDestinationPrefixes("/app");
|
||||
}
|
||||
@@ -1766,16 +1766,14 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:message-broker application-destination-prefix="/app" path-matcher="**pathMatcher**">
|
||||
<websocket:message-broker application-destination-prefix="/app" path-matcher="pathMatcher">
|
||||
<websocket:stomp-endpoint path="/stomp"/>
|
||||
<websocket:stomp-broker-relay prefix="/topic,/queue" />
|
||||
</websocket:message-broker>
|
||||
|
||||
**
|
||||
<bean id="pathMatcher" class="org.springframework.util.AntPathMatcher">
|
||||
<constructor-arg index="0" value="."/>
|
||||
</bean>
|
||||
**
|
||||
|
||||
</beans>
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user