Browse Source

Fix single quote formatting issues in the reference manual

pull/1029/head
Sam Brannen 10 years ago
parent
commit
6d7f497ab3
  1. 2
      src/asciidoc/core-aop.adoc
  2. 4
      src/asciidoc/core-beans.adoc
  3. 4
      src/asciidoc/data-access.adoc
  4. 6
      src/asciidoc/integration.adoc
  5. 10
      src/asciidoc/testing.adoc
  6. 6
      src/asciidoc/web-mvc.adoc

2
src/asciidoc/core-aop.adoc

@ -1991,7 +1991,7 @@ proceed with the method call: the presence of this parameter is an indication th @@ -1991,7 +1991,7 @@ proceed with the method call: the presence of this parameter is an indication th
public class SimpleProfiler {
public Object profile(ProceedingJoinPoint call, String name, int age) throws Throwable {
StopWatch clock = new StopWatch("Profiling for ''" + name + "'' and ''" + age + "''");
StopWatch clock = new StopWatch("Profiling for '" + name + "' and '" + age + "'");
try {
clock.start(call.toShortString());
return call.proceed();

4
src/asciidoc/core-beans.adoc

@ -3707,7 +3707,7 @@ Find below the custom `BeanPostProcessor` implementation class definition: @@ -3707,7 +3707,7 @@ Find below the custom `BeanPostProcessor` implementation class definition:
public Object postProcessAfterInitialization(Object bean,
String beanName) throws BeansException {
System.out.println("Bean ''" + beanName + "'' created : " + bean.toString());
System.out.println("Bean '" + beanName + "' created : " + bean.toString());
return bean;
}
@ -7499,7 +7499,7 @@ hierarchy of property sources. To explain fully, consider the following: @@ -7499,7 +7499,7 @@ hierarchy of property sources. To explain fully, consider the following:
ApplicationContext ctx = new GenericApplicationContext();
Environment env = ctx.getEnvironment();
boolean containsFoo = env.containsProperty("foo");
System.out.println("Does my environment contain the ''foo'' property? " + containsFoo);
System.out.println("Does my environment contain the 'foo' property? " + containsFoo);
----
In the snippet above, we see a high-level way of asking Spring whether the `foo` property is

4
src/asciidoc/data-access.adoc

@ -1778,7 +1778,7 @@ a transaction. You then pass an instance of your custom `TransactionCallback` to @@ -1778,7 +1778,7 @@ a transaction. You then pass an instance of your custom `TransactionCallback` to
// use constructor-injection to supply the PlatformTransactionManager
public SimpleService(PlatformTransactionManager transactionManager) {
Assert.notNull(transactionManager, "The ''transactionManager'' argument must not be null.");
Assert.notNull(transactionManager, "The 'transactionManager' argument must not be null.");
this.transactionTemplate = new TransactionTemplate(transactionManager);
}
@ -1845,7 +1845,7 @@ a specific `TransactionTemplate:` @@ -1845,7 +1845,7 @@ a specific `TransactionTemplate:`
private final TransactionTemplate transactionTemplate;
public SimpleService(PlatformTransactionManager transactionManager) {
Assert.notNull(transactionManager, "The ''transactionManager'' argument must not be null.");
Assert.notNull(transactionManager, "The 'transactionManager' argument must not be null.");
this.transactionTemplate = new TransactionTemplate(transactionManager);
// the transaction settings can be set here explicitly if so desired

6
src/asciidoc/integration.adoc

@ -6007,7 +6007,7 @@ along with an inline image. @@ -6007,7 +6007,7 @@ along with an inline image.
helper.setTo("test@host.com");
// use the true flag to indicate the text included is HTML
helper.setText("<html><body><img src=''cid:identifier1234''></body></html>", true);
helper.setText("<html><body><img src='cid:identifier1234'></body></html>", true);
// let's include the infamous windows Sample file (this time copied to c:/)
FileSystemResource res = new FileSystemResource(new File("c:/Sample.jpg"));
@ -7366,7 +7366,7 @@ message is surrounded by quotes. Below are the changes that I (the author) make @@ -7366,7 +7366,7 @@ message is surrounded by quotes. Below are the changes that I (the author) make
public String getMessage() {
// change the implementation to surround the message in quotes
return "''" + this.message + "''"
return "'" + this.message + "'"
}
public void setMessage(String message) {
@ -7773,7 +7773,7 @@ will want to do with this callback, and you can see an example of doing that bel @@ -7773,7 +7773,7 @@ will want to do with this callback, and you can see an example of doing that bel
DelegatingMetaClass metaClass = new DelegatingMetaClass(goo.getMetaClass()) {
public Object invokeMethod(Object object, String methodName, Object[] arguments) {
System.out.println("Invoking ''" + methodName + "''.");
System.out.println("Invoking '" + methodName + "'.");
return super.invokeMethod(object, methodName, arguments);
}
};

10
src/asciidoc/testing.adoc

@ -2949,8 +2949,8 @@ framework. @@ -2949,8 +2949,8 @@ framework.
c:loginAction-ref="loginAction" />
<bean id="loginAction" class="com.example.LoginAction"
c:username="#{request.getParameter(''user'')}"
c:password="#{request.getParameter(''pswd'')}"
c:username="#{request.getParameter('user')}"
c:password="#{request.getParameter('pswd')}"
scope="request">
<aop:scoped-proxy />
</bean>
@ -3011,7 +3011,7 @@ framework. @@ -3011,7 +3011,7 @@ framework.
<bean id="userPreferences"
class="com.example.UserPreferences"
c:theme="#{session.getAttribute(''theme'')}"
c:theme="#{session.getAttribute('theme')}"
scope="session">
<aop:scoped-proxy />
</bean>
@ -4160,7 +4160,7 @@ be verified using JsonPath expressions: @@ -4160,7 +4160,7 @@ be verified using JsonPath expressions:
[subs="verbatim,quotes"]
----
mockMvc.perform(get("/people").accept(MediaType.APPLICATION_JSON))
.andExpect(jsonPath("$.links[?(@.rel == ''self'')].href").value("http://localhost:8080/people"));
.andExpect(jsonPath("$.links[?(@.rel == 'self')].href").value("http://localhost:8080/people"));
----
When XML response content contains hypermedia links created with
@ -4172,7 +4172,7 @@ be verified using XPath expressions: @@ -4172,7 +4172,7 @@ be verified using XPath expressions:
----
Map<String, String> ns = Collections.singletonMap("ns", "http://www.w3.org/2005/Atom");
mockMvc.perform(get("/handle").accept(MediaType.APPLICATION_XML))
.andExpect(xpath("/person/ns:link[@rel=''self'']/@href", ns).string("http://localhost:8080/people"));
.andExpect(xpath("/person/ns:link[@rel='self']/@href", ns).string("http://localhost:8080/people"));
----
[[spring-mvc-test-server-filters]]

6
src/asciidoc/web-mvc.adoc

@ -3376,7 +3376,7 @@ You can prepare a link from a JSP as follows: @@ -3376,7 +3376,7 @@ You can prepare a link from a JSP as follows:
----
<%@ taglib uri="http://www.springframework.org/tags" prefix="s" %>
...
<a href="${s:mvcUrl(''PAC#getAddress'').arg(0,''US'').buildAndExpand(''123'')}">Get Address</a>
<a href="${s:mvcUrl('PAC#getAddress').arg(0,'US').buildAndExpand('123')}">Get Address</a>
----
The above example relies on the `mvcUrl` JSP function declared in the Spring tag library
@ -3574,9 +3574,9 @@ defined in the previous example to customize the look and feel: @@ -3574,9 +3574,9 @@ defined in the previous example to customize the look and feel:
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<html>
<head>
<link rel="stylesheet" href="<spring:theme code=''styleSheet''/>" type="text/css"/>
<link rel="stylesheet" href="<spring:theme code='styleSheet'/>" type="text/css"/>
</head>
<body style="background=<spring:theme code=''background''/>">
<body style="background=<spring:theme code='background'/>">
...
</body>
</html>

Loading…
Cancel
Save