Fix single quote formatting issues in the reference manual
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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:
|
||||
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
|
||||
|
||||
@@ -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:`
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
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
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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.
|
||||
|
||||
<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:
|
||||
[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:
|
||||
----
|
||||
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]]
|
||||
|
||||
@@ -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:
|
||||
<%@ 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>
|
||||
|
||||
Reference in New Issue
Block a user