@ -224,7 +224,7 @@ The footnote should x-ref to first section in that chapter but I can't find the
@@ -224,7 +224,7 @@ The footnote should x-ref to first section in that chapter but I can't find the
<para>After you learn about Spring's IoC container, you may want to know
more about Spring's <interfacename>Resource</interfacename>
abstraction, as described in <xreflinkend="resources"/>, which
provides a convenient mechanism for reading an InputSream from
provides a convenient mechanism for reading an InputStream from
locations defined in a URI syntax. In particular,
<classname>Resource</classname> paths are used to construct
@ -98,7 +98,7 @@ public Book findBook(ISBN isbn) {...}]]></programlisting>
@@ -98,7 +98,7 @@ public Book findBook(ISBN isbn) {...}]]></programlisting>
In fact, depending on the JVM implementation or running conditions, the same hashCode can be reused for different objects, in the same VM instance.</para>
<para>To provide a different <emphasis>default</emphasis> key generator, one needs to implement the <interfacename>org.springframework.cache.KeyGenerator</interfacename> interface.
Once configured, the generator will be used for each declaration that doesn not specify its own key generation strategy (see below).
Once configured, the generator will be used for each declaration that does not specify its own key generation strategy (see below).
</para>
</section>
@ -223,11 +223,11 @@ public Book findBook(String name)]]></programlisting>
@@ -223,11 +223,11 @@ public Book findBook(String name)]]></programlisting>
<para>For cases where the cache needs to be updated without interferring with the method execution, one can use the <literal>@CachePut</literal> annotation. That is, the method will always
<para>For cases where the cache needs to be updated without interfering with the method execution, one can use the <literal>@CachePut</literal> annotation. That is, the method will always
be executed and its result placed into the cache (according to the <literal>@CachePut</literal> options). It supports the same options as <literal>@Cacheable</literal> and should be used
for cache population rather then method flow optimization.</para>
<para>Note that using <literal>@CachePut</literal> and <literal>@Cacheable</literal> annotations on the same method is generaly discouraged because they have different behaviours. While the latter
<para>Note that using <literal>@CachePut</literal> and <literal>@Cacheable</literal> annotations on the same method is generally discouraged because they have different behaviours. While the latter
causes the method execution to be skipped by using the cache, the former forces the execution in order to execute a cache update. This leads to unexpected behaviour and with the exception of specific
corner-cases (such as annotations having conditions that exclude them from each other), such declarations should be avoided.</para>
</section>
@ -447,7 +447,7 @@ public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)]]><
@@ -447,7 +447,7 @@ public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)]]><
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)]]></programlisting>
<para>Even though <literal>@SlowService</literal> is not a Spring annotation, the container automatically picks up its declaration at runtime and understands its meaning. Note that as
mentined <linklinkend="cache-annotation-enable">above</link>, the annotation-driven behaviour needs to be enabled.</para>
mentioned <linklinkend="cache-annotation-enable">above</link>, the annotation-driven behaviour needs to be enabled.</para>
</section>
</section>
@ -488,7 +488,7 @@ public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)]]><
@@ -488,7 +488,7 @@ public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)]]><
<para>The declarative XML caching supports all of the annotation-based model so moving between the two should be fairly easy - further more both can be used inside the same application.
The XML based approach does not touch the target code however it is inherently more verbose; when dealing with classes with overloaded methods that are targeted for caching, identifying the
proper methods does take an extra effort since the <literal>method</literal> argument is not a good discriminator - in these cases, the AspectJ pointcut can be used to cherry pick the target
methods and apply the appropriate caching functionality. Howeve through XML, it is easier to apply a package/group/interface-wide caching (again due to the AspectJ poincut) and to create
methods and apply the appropriate caching functionality. However through XML, it is easier to apply a package/group/interface-wide caching (again due to the AspectJ pointcut) and to create
template-like definitions (as we did in the example above by defining the target cache through the <literal>cache:definitions </literal><literal>cache</literal> attribute).
</para>
</section>
@ -554,7 +554,7 @@ public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)]]><
@@ -554,7 +554,7 @@ public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)]]><
<propertyname="addNoOpCache"value="true"/>
</bean>]]></programlisting>
<para>The <literal>CompositeCacheManager</literal> above chains multiple <literal>CacheManager</literal>s and aditionally, through the <literal>addNoOpManager</literal> flag, adds a
<para>The <literal>CompositeCacheManager</literal> above chains multiple <literal>CacheManager</literal>s and additionally, through the <literal>addNoOpManager</literal> flag, adds a
<emphasis>no op</emphasis> cache that for all the definitions not handled by the configured cache managers. That is, every cache definition not found in either <literal>jdkCache</literal>
or <literal>gemfireCache</literal> (configured above) will be handled by the no op cache, which will not store any information causing the target method to be executed every time.
length indicates the number of updates in that batch. The number of
updates in each batch should be the the batch size provided for all
batches except for the last one that might be less, depending on the
total number of updat objects provided. The update count for each update
stament is the one reported by the JDBC driver. If the count is not
total number of update objects provided. The update count for each update
statement is the one reported by the JDBC driver. If the count is not
available, the JDBC driver returns a -2 value.</para>
</section>
</section>
@ -2501,7 +2501,7 @@ public class TitlesAfterDateStoredProcedure extends StoredProcedure {
@@ -2501,7 +2501,7 @@ public class TitlesAfterDateStoredProcedure extends StoredProcedure {
<para>Many update and query methods of the
<classname>JdbcTemplate</classname> take an additional parameter in
the form of an <code>int </code>array. This array is used to
indicate the SQL type of the coresponding parameter using constant
indicate the SQL type of the corresponding parameter using constant
values from the <classname>java.sql.Types</classname> class. <!--Reword to say *what* is using constant values from the java.sql.Types class to do *what*. Phrases that being with *using* are --><!--often unclear as to what uses what to do what.-->Provide
one entry for each parameter.</para>
</listitem>
@ -2983,7 +2983,7 @@ public class DataAccessUnitTestTemplate {
@@ -2983,7 +2983,7 @@ public class DataAccessUnitTestTemplate {
<jdbc:script location="..."/>
</jdbc:initialize-database></programlisting>In this example we are
saying we expect that sometimes the scripts will be run against an empty
dtabase and there are some DROP statements in the scripts which would
database and there are some DROP statements in the scripts which would
therefore fail. So failed SQL <code>DROP</code> statements will be
ignored, but other failures will cause an exception. This is useful if
your SQL dialect doesn't support <code>DROP ... IF EXISTS</code> (or
<para>In the preceding example, all requests startig with
<para>In the preceding example, all requests starting with
<literal>/example</literal> will be handled by the
<classname>DispatcherServlet</classname> instance named
<literal>example</literal>. This is only the first step in setting up
@ -1073,7 +1073,7 @@ public void addPet(@RequestBody Pet pet, Model model) {
@@ -1073,7 +1073,7 @@ public void addPet(@RequestBody Pet pet, Model model) {
<para>The <emphasis>consumes</emphasis> condition is supported on
the type and on the method level. Unlike most other conditions, when
used at the type level, method-level consumable types override
rather than extend type-level consumeable types.</para>
rather than extend type-level consumable types.</para>
</tip>
</section>
@ -1116,7 +1116,7 @@ public Pet getPet(@PathVariable String petId, Model model) {
@@ -1116,7 +1116,7 @@ public Pet getPet(@PathVariable String petId, Model model) {
<para>You can narrow request matching through request parameter
conditions such as <code>"myParam"</code>, <code>"!myParam"</code>, or
<code>"myParam=myValue"</code>. The first two test for request
parameter presense/absence and the third for a specific parameter
parameter presence/absence and the third for a specific parameter
value. Here is an example with a request parameter value
condition:</para>
@ -4581,7 +4581,7 @@ public class WebConfig extends WebMvcConfigurerAdapter {
@@ -4581,7 +4581,7 @@ public class WebConfig extends WebMvcConfigurerAdapter {
<code>DefaultServletHttpRequestHandler</code> will attempt to
auto-detect the default Servlet for the container at startup time, using
a list of known names for most of the major Servlet containers
(including Tomcat, Jetty, Glassfish, JBoss, Resin, WebLogic, and
(including Tomcat, Jetty, GlassFish, JBoss, Resin, WebLogic, and
WebSphere). If the default Servlet has been custom configured with a
different name, or if a different Servlet container is being used where
the default Servlet name is unknown, then the default Servlet's name
<classname>ConversionService</classname>, it can be directly
configured for use with Spring's DataBinder and the Spring Expression
Language (SpEL).
@ -1419,7 +1419,7 @@ public interface FormatterRegistrar {
@@ -1419,7 +1419,7 @@ public interface FormatterRegistrar {
<title>Configuring Formatting in Spring MVC</title>
<para> In a Spring MVC application, you may configure a custom
ConversionService instance explicity as an attribute of the
ConversionService instance explicitly as an attribute of the
<literal>annotation-driven</literal> element of the MVC namespace. This
ConversionService will then be used anytime a type conversion is
required during Controller model binding. If not configured explicitly,
@ -1443,7 +1443,7 @@ public interface FormatterRegistrar {
@@ -1443,7 +1443,7 @@ public interface FormatterRegistrar {
</beans>]]></programlisting>
<para> With this one-line of configuation, default formatters for Numbers
<para> With this one-line of configuration, default formatters for Numbers
and Date types will be installed, including support for the
@NumberFormat and @DateTimeFormat annotations. Full support for the Joda
Time formatting library is also installed if Joda Time is present on the
@ -1503,7 +1503,7 @@ public interface FormatterRegistrar {
@@ -1503,7 +1503,7 @@ public interface FormatterRegistrar {
<para> Spring 3 introduces several enhancements to its validation support.
First, the JSR-303 Bean Validation API is now fully supported. Second,
when used programatically, Spring's DataBinder can now validate objects as
when used programmatically, Spring's DataBinder can now validate objects as
well as bind to them. Third, Spring MVC now has support for declaratively
validating @Controller inputs. </para>
@ -1671,7 +1671,7 @@ public class MyConstraintValidator implements ConstraintValidator {
@@ -1671,7 +1671,7 @@ public class MyConstraintValidator implements ConstraintValidator {
<code>binder.validate()</code>. Any validation Errors are automatically
added to the binder's BindingResult. </para>
<para> When working with the DataBinder programatically, this can be used
<para> When working with the DataBinder programmatically, this can be used
to invoke validation logic after binding to a target object: </para>
<programlistinglanguage="java">Foo target = new Foo();
@ -225,7 +225,7 @@ public class SimpleDateFormatBeanDefinitionParser extends AbstractSingleBeanDefi
@@ -225,7 +225,7 @@ public class SimpleDateFormatBeanDefinitionParser extends AbstractSingleBeanDefi
properties files. These properties files are both placed in a
<filenameclass="directory">'META-INF'</filename> directory in your application, and can, for
example, be distributed alongside your binary classes in a JAR file. The Spring XML parsing
infrastructurewill automatically pick up your new extension by consuming these special
infrastructurewill automatically pick up your new extension by consuming these special
properties files, the formats of which are detailed below.</para>