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:
Sam Brannen
2019-03-13 15:12:51 +01:00
parent 00196ea14a
commit 8f7b118701
13 changed files with 81 additions and 83 deletions

View File

@@ -1808,14 +1808,14 @@ respectively. For example, the previous pointcut can be better written as follow
====
[source,xml,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
<aop:config>
<aop:aspect id="myAspect" ref="aBean">
<aop:pointcut id="businessService"
expression="execution(* com.xyz.myapp.service.*.*(..)) **and** this(service)"/>
expression="execution(* com.xyz.myapp.service.*.*(..)) and this(service)"/>
<aop:before pointcut-ref="businessService" method="monitor"/>
@@ -3331,7 +3331,7 @@ the following example:
class="foo.StubEntitlementCalculationService"/>
<!-- this switches on the load-time weaving -->
**<context:load-time-weaver/>**
<context:load-time-weaver/>
</beans>
----
====

View File

@@ -875,7 +875,7 @@ use the `NamespaceHandlerSupport` class:
public class MyNamespaceHandler extends NamespaceHandlerSupport {
public void init() {
**registerBeanDefinitionParser("dateformat", new SimpleDateFormatBeanDefinitionParser());**
registerBeanDefinitionParser("dateformat", new SimpleDateFormatBeanDefinitionParser());
}
}

View File

@@ -2806,7 +2806,7 @@ to do so:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
**@RequestScope**
@RequestScope
@Component
public class LoginAction {
// ...
@@ -2846,7 +2846,7 @@ When using annotation-driven components or Java configuration, you can use the
[source,java,indent=0]
[subs="verbatim,quotes"]
----
**@SessionScope**
@SessionScope
@Component
public class UserPreferences {
// ...
@@ -2885,7 +2885,7 @@ following example shows how to do so:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
**@ApplicationScope**
@ApplicationScope
@Component
public class AppPreferences {
// ...
@@ -4893,7 +4893,7 @@ primary `MovieCatalog`:
public class MovieConfiguration {
@Bean
**@Primary**
@Primary
public MovieCatalog firstMovieCatalog() { ... }
@Bean
@@ -4938,7 +4938,7 @@ The corresponding bean definitions follow:
<context:annotation-config/>
<bean class="example.SimpleMovieCatalog" **primary="true"**>
<bean class="example.SimpleMovieCatalog" primary="true">
<!-- inject any dependencies required by this bean -->
</bean>
@@ -4971,7 +4971,7 @@ shown in the following example:
public class MovieRecommender {
@Autowired
**@Qualifier("main")**
@Qualifier("main")
private MovieCatalog movieCatalog;
// ...
@@ -4993,7 +4993,7 @@ method parameters, as shown in the following example:
private CustomerPreferenceDao customerPreferenceDao;
@Autowired
public void prepare(**@Qualifier("main")**MovieCatalog movieCatalog,
public void prepare(@Qualifier("main") MovieCatalog movieCatalog,
CustomerPreferenceDao customerPreferenceDao) {
this.movieCatalog = movieCatalog;
this.customerPreferenceDao = customerPreferenceDao;
@@ -5113,7 +5113,7 @@ provide the `@Qualifier` annotation within your definition, as the following exa
----
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
**@Qualifier**
@Qualifier
public @interface Genre {
String value();
@@ -5131,13 +5131,13 @@ following example shows:
public class MovieRecommender {
@Autowired
**@Genre("Action")**
@Genre("Action")
private MovieCatalog actionCatalog;
private MovieCatalog comedyCatalog;
@Autowired
public void setComedyCatalog(**@Genre("Comedy")** MovieCatalog comedyCatalog) {
public void setComedyCatalog(@Genre("Comedy") MovieCatalog comedyCatalog) {
this.comedyCatalog = comedyCatalog;
}
@@ -5169,12 +5169,12 @@ demonstrates both approaches:
<context:annotation-config/>
<bean class="example.SimpleMovieCatalog">
**<qualifier type="Genre" value="Action"/>**
<qualifier type="Genre" value="Action"/>
<!-- inject any dependencies required by this bean -->
</bean>
<bean class="example.SimpleMovieCatalog">
**<qualifier type="example.Genre" value="Comedy"/>**
<qualifier type="example.Genre" value="Comedy"/>
<!-- inject any dependencies required by this bean -->
</bean>
@@ -5496,7 +5496,7 @@ named `movieFinder` injected into its setter method:
private MovieFinder movieFinder;
**@Resource**
@Resource
public void setMovieFinder(MovieFinder movieFinder) {
this.movieFinder = movieFinder;
}
@@ -5705,7 +5705,7 @@ You can then use `@SessionScope` without declaring the `proxyMode` as follows:
[subs="verbatim,quotes"]
----
@Service
**@SessionScope**
@SessionScope
public class SessionScopedService {
// ...
}
@@ -5719,7 +5719,7 @@ You can also override the value for the `proxyMode`, as the following example sh
[subs="verbatim,quotes"]
----
@Service
**@SessionScope(proxyMode = ScopedProxyMode.INTERFACES)**
@SessionScope(proxyMode = ScopedProxyMode.INTERFACES)
public class SessionScopedUserService implements UserService {
// ...
}
@@ -6248,7 +6248,7 @@ technique:
[subs="verbatim,quotes"]
----
@Component
**@Qualifier("Action")**
@Qualifier("Action")
public class ActionMovieCatalog implements MovieCatalog {
// ...
}
@@ -6258,7 +6258,7 @@ technique:
[subs="verbatim,quotes"]
----
@Component
**@Genre("Action")**
@Genre("Action")
public class ActionMovieCatalog implements MovieCatalog {
// ...
}
@@ -6268,7 +6268,7 @@ technique:
[subs="verbatim,quotes"]
----
@Component
**@Offline**
@Offline
public class CachingMovieCatalog implements MovieCatalog {
// ...
}
@@ -7189,7 +7189,7 @@ as the following example shows:
public class MyConfiguration {
@Bean
**@Scope("prototype")**
@Scope("prototype")
public Encryptor encryptor() {
// ...
}
@@ -7217,7 +7217,7 @@ it resembles the following:
----
// an HTTP Session-scoped bean exposed as a proxy
@Bean
**@SessionScope**
@SessionScope
public UserPreferences userPreferences() {
return new UserPreferences();
}
@@ -7298,7 +7298,7 @@ annotation, as the following example shows:
public class AppConfig {
@Bean
**@Description("Provides a basic example of a bean")**
@Description("Provides a basic example of a bean")
public Thing thing() {
return new Thing();
}
@@ -8127,7 +8127,7 @@ can rewrite the `dataSource` configuration as follows:
[subs="verbatim,quotes"]
----
@Configuration
**@Profile("development")**
@Profile("development")
public class StandaloneDataConfig {
@Bean
@@ -8145,7 +8145,7 @@ can rewrite the `dataSource` configuration as follows:
[subs="verbatim,quotes"]
----
@Configuration
**@Profile("production")**
@Profile("production")
public class JndiDataConfig {
@Bean(destroyMethod="")
@@ -8186,7 +8186,7 @@ of creating a custom composed annotation. The following example defines a custom
----
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
**@Profile("production")**
@Profile("production")
public @interface Production {
}
----
@@ -8423,7 +8423,7 @@ following example:
[subs="verbatim,quotes"]
----
@Configuration
**@Profile("default")**
@Profile("default")
public class DefaultDataConfig {
@Bean
@@ -8540,7 +8540,7 @@ a call to `testBean.getName()` returns `myTestBean`:
[subs="verbatim,quotes"]
----
@Configuration
**@PropertySource("classpath:/com/myco/app.properties")**
@PropertySource("classpath:/com/myco/app.properties")
public class AppConfig {
@Autowired

View File

@@ -707,7 +707,7 @@ implementation of an `initBinder(..)` method:
protected void initBinder(HttpServletRequest request,
ServletRequestDataBinder binder) throws Exception {
**this.customPropertyEditorRegistrar.registerCustomEditors(binder);**
this.customPropertyEditorRegistrar.registerCustomEditors(binder);
}
// other methods to do with registering a User