Commit Graph

802 Commits

Author SHA1 Message Date
Sam Brannen 2dc4da3d4e Link to AssertJ instead of Fest in testing chapter 2015-09-30 22:06:07 +02:00
Sam Brannen faa2f5cc50 Fix formatting in SpEL chapter 2015-09-28 22:44:31 +02:00
Sam Brannen 8d58f66c0f Fix formatting in SpEL chapter 2015-09-28 22:23:12 +02:00
Juergen Hoeller d3c539a9ab Portlet MVC documentation consistently refers to Portlet 2.0 spec (JSR-286)
Issue: SPR-13513
2015-09-28 22:12:36 +02:00
Sam Brannen 3dcf8c1712 Simplify legacy JUnit 3.8 based tests in spring-orm
This is in preparation for a migration from JUnit 3 to JUnit 4.

Issue: SPR-13514, SPR-13515
2015-09-28 01:19:27 +02:00
Brian Clozel 55db4ae94b Document that @ResponseStatus overrides redirect views
Issue: SPR-13439
2015-09-24 18:43:51 +02:00
Sam Brannen de2e201a2a Refer to @Commit instead of @Rollback(false) in the reference manual 2015-09-10 19:35:17 +02:00
Sebastien Deleuze f3b7e9ff2d Expose view url to render function in ScriptTemplateView
After this change, with Nashorn it is possible to use either
render(template, model) or render(template, model, url).
With JRuby or Jython, specifying the 3 parameters is mandatory.

Issue: SPR-13453
2015-09-09 18:05:04 +02:00
Juergen Hoeller f2c9838e95 Updated ContentNegotiatingViewResolver example towards ContentNegotiationManager
Issue: SPR-13431
2015-09-09 11:46:14 +02:00
Sam Brannen 734aecb15a Polish "What's New" section in reference manual 2015-09-03 17:30:14 +02:00
Brian Clozel d3d81c2864 Add MockHttpServletResponse.getDateHeader
This change adds a new `getDateHeader` method that converts date header
Strings to long values - making tests more readable.

This feature is also documented in the "what's new section" for 4.2.
2015-09-03 16:03:46 +02:00
Sebastien Deleuze 12937680b7 Add a section about message converters customization in the refdoc
Issue: SPR-13411
2015-09-01 00:58:29 +02:00
Sam Brannen af905aaaea Document HtmlUnit & WebDriver deps in reference manual
This commit improves the documentation in the reference manual for the
HtmlUnit & Selenium WebDriver integration in the Spring MVC Test
framework by mentioning the group and artifact IDs required for this
functionality.

Issue: SPR-13299
2015-09-01 00:53:00 +02:00
Sam Brannen d899efd672 Fix typo in reference manual 2015-08-30 19:01:28 +02:00
Sebastien Deleuze 63fe5b9069 Fix typo in reference documentation 2015-08-27 10:59:02 +02:00
Sam Brannen 7107c8cb05 Fix typo & grammar in MVC Test reference doc 2015-08-26 15:13:19 +02:00
Rossen Stoyanchev 4ecb3d4f3f Update WebSocket docs on proxying @Controller
Issue: SPR-13384
2015-08-25 22:14:36 -04:00
Brian Clozel 190eb6ace1 Set ETag header with VersionResourceResolver
Prior to this change, VersionResourceResolver and VersionStrategy would
resolve static resources using version strings. They assist
ResourceHttpRequestHandler with serving static resources. The
RequestHandler itself can be configured with HTTP caching strategies to
set Cache-Control headers.

In order to have a complete strategy with Cache-Control and ETag
response headers, developers can't reuse that version string information
and have to rely on other mechanisms (like ShallowEtagHeaderFilter).

This commit makes VersionResourceResolver use that version string to set
it as a request attribute, which will be used by the
ResourceHttpRequestHandler to write an ETag response header.

Issue: SPR-13382
2015-08-25 16:49:10 +02:00
xueyua ddd6c9bea0 Fix typos in Web MVC documentation 2015-08-18 16:18:45 +02:00
Sam Brannen 94639d2dcf Update @since tag in Eclipse code template to 4.2.1 2015-08-17 01:19:22 +02:00
Sam Brannen b5a6707137 Fix layout in What's New section 2015-08-11 23:48:15 +02:00
Toshiaki Maki 1ef0015eb2 Remove type parameter of ResponseBodyEmitter
Closes gh-851
2015-07-31 17:45:53 +02:00
Sam Brannen 731eccf524 Link to Annotation Programming Model from What's New
Issue: SPR-11515
2015-07-30 23:43:02 +02:00
Sam Brannen 4d6f143f85 Add link to 'Spring Annotation Programming Model' Wiki page
Issue: SPR-11515
2015-07-30 22:33:13 +02:00
Sam Brannen c91c93c816 Polish reference manual 2015-07-30 21:31:40 +02:00
Juergen Hoeller 8bc2bffa77 JSR-223 coverage in new-in-4.2 2015-07-30 19:36:38 +02:00
Sam Brannen 72c4e6157c Polish appendices in the reference manual 2015-07-29 22:26:56 +02:00
Sam Brannen 754b7672f4 Document Spring's JUnit Rules in the reference manual
Issue: SPR-13037
2015-07-29 22:03:44 +02:00
Sam Brannen bfdf6b7b3a Document unique names for embedded databases in reference manual
Issue: SPR-12839
2015-07-29 21:15:39 +02:00
Sam Brannen fb07be55b5 Fix formatting and punctuation errors in reference manual 2015-07-29 21:14:16 +02:00
Sam Brannen e0fbd2d5b9 Reorganize embedded database sections in reference manual 2015-07-29 20:43:30 +02:00
Sam Brannen c5b9b396aa Polish embedded database sections in reference manual 2015-07-29 20:35:59 +02:00
Sam Brannen 725292081e Introduce 'value' alias for 'attribute' in @AliasFor
SPR-11512 introduced support for annotation attribute aliases via
@AliasFor, requiring the explicit declaration of the 'attribute'
attribute. However, for aliases within an annotation, this explicit
declaration is unnecessary.

This commit improves the readability of alias pairs declared within an
annotation by introducing a 'value' attribute in @AliasFor that is an
alias for the existing 'attribute' attribute. This allows annotations
such as @ContextConfiguration from the spring-test module to declare
aliases as follows.

public @interface ContextConfiguration {

     @AliasFor("locations")
     String[] value() default {};

     @AliasFor("value")
     String[] locations() default {};

    // ...
}

Issue: SPR-13289
2015-07-29 15:27:06 +02:00
Juergen Hoeller 90493f49e6 Notes about autowiring in configuration classes and late registration scenarios
Issue: SPR-12970
Issue: SPR-13285
2015-07-29 13:18:15 +02:00
Sam Brannen 8de7848ab3 Polish HtmlUnit support in the reference manual
Issues SPR-13158
2015-07-28 18:46:18 +02:00
Sam Brannen 9023cf6ae0 Redesign MockMvcHtmlUnitDriverBuilder API
This commit introduces a dedicated build() method in
MockMvcHtmlUnitDriverBuilder to replace createDriver(). In addition,
the configureDriver() method has been renamed to withDelegate() and now
returns the builder for further customization.

This commit also overhauls the Javadoc for static factory methods and
the class-level Javadoc in MockMvcHtmlUnitDriverBuilder for greater
clarity to end users.

Issues SPR-13158
2015-07-27 22:41:22 +02:00
Sam Brannen af73aae1d5 Polish & fix copy-n-paste errors in HtmlUnit reference
Issues SPR-13158
2015-07-27 22:32:37 +02:00
Sam Brannen 3b84a7e84d Redesign MockMvcWebClientBuilder API
This commit introduces a dedicated build() method in
MockMvcWebClientBuilder to replace createWebClient(). In addition, the
configureWebClient() method has been renamed to withDelegate() and now
returns the builder for further customization.

This commit also overhauls the constructor and class-level Javadoc in
MockMvcWebClientBuilder for greater clarity to end users.

Issues SPR-13158
2015-07-27 19:48:01 +02:00
Juergen Hoeller e5a2b34829 Clarify acknowledge mode semantics and transaction recommendations
Issue: SPR-13278
2015-07-27 15:32:18 +02:00
Sam Brannen bc1f0d3bdc Mention HtmlUnit support in the What's New section
Issue: SPR-13158
2015-07-27 12:03:21 +02:00
Rob Winch b73e39423c Introduce support for HtmlUnit in Spring MVC Test
This commit introduces integration between MockMvc and HtmlUnit, thus
simplifying end-to-end testing when using HTML-based views and enabling
developers to do the following.

 - Easily test HTML pages using tools such as HtmlUnit, WebDriver, & Geb
   without the need to deploy to a Servlet container

 - Test JavaScript within pages

 - Optionally test using mock services to speed up testing

 - Share logic between in-container, end-to-end tests and
   out-of-container integration tests

Issue: SPR-13158
2015-07-27 12:03:21 +02:00
Sam Brannen d6bdfcaa6e Introduce @Commit alias for @Rollback(false)
Due to common usage of @Rollback(false), this commit introduces a new
@Commit annotation that more clearly conveys the intent of the code
while retaining the run-time semantics.

@Commit is in fact meta-annotated with @Rollback(false).

Issue: SPR-13279
2015-07-25 21:09:32 +02:00
Sam Brannen 3f8b51283e Support @Rollback on classes & deprecate @TxConfig
Since Spring Framework 2.5, @Rollback has been supported on test
methods, with class-level rollback settings configured via
@TransactionConfiguration; however, allowing @Rollback to be declared
on test classes with method-level declarations overriding class-level
declarations would prove more intuitive than having to declare both
@TransactionConfiguration and @Rollback. Furthermore, the
transactionManager flag in @TransactionConfiguration was made
superfluous many years ago with the introduction of support for a
qualifier in @Transactional.

This commit enables @Rollback to be declared at the class level for
default rollback semantics within test class hierarchies and deprecates
@TransactionConfiguration in favor of @Rollback and @Transactional
qualifiers.

Issue: SPR-13276, SPR-13277
2015-07-25 18:22:26 +02:00
Sebastien Deleuze 8e5244ac3d Polish script templating documentation 2015-07-24 00:00:24 +02:00
Sam Brannen 0e67adb3a9 Update list of annotations supporting @AliasFor 2015-07-23 19:15:18 +02:00
Sam Brannen dd0966e1f5 Cross reference Servlet API mocks in Testing chapter 2015-07-21 18:26:03 +02:00
Sam Brannen d67d8ddf2d Fix formatting 2015-07-21 18:24:52 +02:00
Sam Brannen 2dfa1804f4 Document AopTestUtils in the reference manual
Issue: SPR-13006
2015-07-21 17:32:30 +02:00
Sam Brannen 420e8ca833 Sync Javadoc and reference manual regarding ReflectionTestUtils 2015-07-21 17:10:00 +02:00
Brian Clozel eef937e4f2 Rename <mvc:cachecontrol/> to <mvc:cache-control/> 2015-07-21 12:09:25 +02:00
Brian Clozel 327785d19e Fix typo in resource handling reference doc 2015-07-21 10:36:14 +02:00
Sam Brannen c3e36ad960 Polish further resources section in Testing chapter 2015-07-20 14:39:35 +02:00
Marten Deinum 92663ec27b Update book reference
Closes gh-838

There is a new version of AspectJ in Action which is now mentioned in the
Further Resources section of the AOP chapter.
2015-07-16 09:25:39 +02:00
Juergen Hoeller 37f74e76f6 TomcatInstrumentableClassLoader supports Tomcat 7.0.63+ as well
Issue: SPR-13210
2015-07-15 00:02:55 +02:00
Stephane Nicoll d738dddd8f Add `createDispatcherServlet` hook point
Add an extra hook point in `AbstractDispatcherServletInitializer` to
customize the `DispatcherServlet`.

Issue: SPR-13222
2015-07-13 14:43:06 +02:00
Sam Brannen 3d951755fa Improve documentation for @IfProfileValue precedence
Issue: SPR-11902
2015-07-10 02:38:54 +03:00
Sebastien Deleuze df9290c00d Improve DispatcherServlet diagrams
Issue: SPR-13120
2015-07-09 17:03:10 +02:00
Stephane Nicoll bf786c3176 Support for multiple events per method
In addition to specifying the event type to listen to via a method
parameter, any @EventListener annotated method can now alternatively
define the event type(s) to listen to via the "classes" attributes (that
is aliased to "value").

Something like

@EventListener({FooEvent.class, BarEvent.class})
public void handleFooBar() { .... }

Issue: SPR-13156
2015-07-08 14:51:07 +02:00
Rossen Stoyanchev 6679120057 Improve STOMP section of documentation
Issue: SPR-12579
2015-07-07 16:17:37 -04:00
Juergen Hoeller 08fb62570e Explicit notes for load-time weaving on Tomcat 7.0.63+ and WildFly 9
Issue: SPR-13210
2015-07-07 22:01:36 +02:00
Sam Brannen 50bed38a85 Polishing 2015-07-07 21:23:02 +02:00
Rossen Stoyanchev 6890e65d2c Suggest use of @Primary for JSR-303 with Spring MVC
A note is added to suggest the use of @Primary with a
LocalValidatorFactory bean next to the MVC Java config.

Issue: SPR-12194
2015-07-07 12:35:38 -04:00
Rossen Stoyanchev 726a47dd81 Refactor Spring MVC related conversion/validation docs
Conversion and validation documentation related to Spring MVC is now
consolidated in the Spring MVC chapter with references to and from
the Validation and Data Binding chapter.

Examples have been updated to include MVC Java config as well.
2015-07-07 12:35:38 -04:00
Stephane Nicoll 7cac5d60a1 Add documentation for @Primary
Issue: SPR-7301
2015-07-07 17:52:52 +02:00
Juergen Hoeller f58e1db2e6 Explicit notes for @Bean on static methods, private methods, and Java 8 default methods
Also includes an explicit note on stop vs destroy callbacks for Lifecycle beans.

Issue: SPR-13118
Issue: SPR-12882
Issue: SPR-12345
Issue: SPR-11671
2015-07-07 16:49:26 +02:00
Rossen Stoyanchev dc715a0f19 Update Spring MVC Test reference
Add section on Spring MVC TEst vs full integation testing and provide
reference to Spring Boot's @WebIntegrationTest as an alternative.

Issue: SPR-13169
2015-07-06 23:06:40 -04:00
Rossen Stoyanchev 9bb29fbc34 Polish Spring MVC Test content 2015-07-06 22:27:19 -04:00
Sam Brannen 688014ad9d Document MVC Test log()/print() variants in reference manual
Issue: SPR-13171
2015-07-02 21:47:14 +02:00
Sebastien Deleuze 6c58258d11 Update AbstractSockJsService and ref doc to SockJS client 1.0.0
Issue: SPR-12422
2015-07-02 15:38:36 +02:00
Sam Brannen df83196ad7 Update required email dependencies in reference manual
Beginning with Java 6, the JavaBeans Activation Framework (JAF) is part
of the JDK. Thus, there is no longer a need to explicitly include a
dependency on `activation.jar` when using Spring's email support in
Spring Framework 4.0 and higher which anyway requires Java 6 or higher.

This commit therefore removes the JAF requirement from the reference
manual.
2015-06-30 18:12:08 +02:00
Sam Brannen 7c94c699df Use annotation attribute aliases in examples
This commit updates examples in the reference manual to use annotation
attribute aliases.
2015-06-29 17:21:29 +02:00
Sam Brannen 595f9bfc41 Polish attribute alias examples in "what's new" 2015-06-29 17:07:48 +02:00
Sam Brannen 110ccaa721 Use annotation attribute aliases in examples
This commit updates examples in the reference manual to use annotation
attribute aliases.
2015-06-29 16:54:45 +02:00
Sam Brannen a7d8103d64 Polish CORS documentation in the reference manual 2015-06-29 16:54:44 +02:00
Sebastien Deleuze 338a18ef99 Polish Web Improvements section 2015-06-29 16:37:58 +02:00
Sebastien Deleuze b439402d57 Add CORS section to the ref doc 2015-06-29 16:02:58 +02:00
Sebastien Deleuze e0d0fc53a9 Update new features section in the reference doc 2015-06-29 11:31:10 +02:00
Sam Brannen 693dcba867 Introduce LoggingResultHandler in Spring MVC Test
Prior to this commit, the Spring MVC Test framework only provided
support for printing debug information about the MvcResult to STDOUT.

This commit introduces support for logging `MvcResult` details at
`DEBUG` level via the Apache Commons Logging API. In addition, this
commit introduces additional `print(..)` variants for printing debug
information to custom output streams and writers.

Specifically, `MockMvcResultHandlers` has been augmented with the
following new static methods:

 - `log()`
 - `print(OutputStream)`
 - `print(Writer)`

Issue: SPR-13171
2015-06-27 21:53:19 +02:00
Brian Clozel 5b47504dd4 Document XsltView in reference doc
And delete all references to the deprecated AbstractXsltView.

Issue: SPR-6599
2015-06-26 18:51:15 +02:00
youmoo 8d06b06a9b Fix BeanWrapperImpl example code in ref. manual 2015-06-26 15:49:03 +02:00
Brian Clozel 776716087c Merge pull request #827 from Youmoo/Youmoo-patch-1
fix typo in reference documentation
2015-06-26 11:59:14 +02:00
Brian Clozel ba48d6489f Mention Groovy Markup Templates in ref doc
Add a section on Groovy Markup Template support and
reorder sections in the View Technologies chapter, to have in order:

* Thymeleaf
* Groovy Markup Template
* Velocity and Freemarker
* JSPs
* Script Templates
* other views...

Issue: SPR-12829
2015-06-26 10:14:30 +02:00
Brian Clozel e72b821a73 Mention WebJarsResourceResolver in ref doc
Issue: SPR-12323
2015-06-26 10:14:30 +02:00
youmoo 2fe6dddbf3 fix typo 2015-06-26 16:04:14 +08:00
Stephane Nicoll d32216a047 Add reference to Order for event listeners 2015-06-24 15:29:07 +02:00
Sam Brannen 10a691bd51 Support inlined SQL statements in @Sql
Prior to this commit, it was only possible to declare SQL statements
via @Sql within external script resources (i.e., classpath or file
system resources); however, many developers have inquired about the
ability to inline SQL statements with @Sql analogous to the support for
inlined properties in @TestPropertySource.

This commit introduces support for declaring _inlined SQL statements_
in `@Sql` via a new `statements` attribute. Inlined statements are
executed after statements in scripts.

Issue: SPR-13159
2015-06-23 20:45:00 +02:00
Stephane Nicoll 04a7ed5f91 Update release note for @JmsListeners 2015-06-22 13:13:16 +02:00
Stephane Nicoll 4631add6cf Add support for repeatable JmsListener
Previously, a method could only declare one Jms endpoint so if several
destinations share the exact same business logic, you'd still need one
separate method declaration per destination.

We now make sure that JmsListener is a repeatable annotation, introducing
JmsListeners for pre Java8 use cases.

Issue: SPR-13147
2015-06-22 13:01:42 +02:00
Sam Brannen e134e3e51b Fix formatting issues in the testing chapter 2015-06-21 16:25:00 +02:00
Sam Brannen 6c530b7bfb Delete trailing whitespace in XML files 2015-06-19 17:14:10 +02:00
Sam Brannen 7c09c2d562 Update "what's new" re: @ActiveProfiles ordering 2015-06-17 21:41:08 +01:00
Sam Brannen 0e00f5bbaa Update "what's new" re: synthesizing maps into annotations 2015-06-17 21:36:13 +01:00
Sam Brannen b65c277fc6 Update list of annotations using @AliasFor 2015-06-17 21:30:02 +01:00
Stephane Nicoll be4329545a Update doc for JmsResponse
Issue: SPR-13133
2015-06-17 17:43:27 +02:00
Stephane Nicoll 95acf8c989 Remove references to codehaus.org
Issue: SPR-13129
2015-06-15 15:44:29 +02:00
Stephane Nicoll aed523c112 Upgrade reference to castor website
Issue: SPR-12991
2015-06-15 15:17:32 +02:00
Stephane Nicoll c111ea89cf Add reference to AutoCloseable and Closeable
Issue: SPR-13041
2015-06-15 15:10:43 +02:00
Stephane Nicoll 06a0dfa682 Update ApplicationEvent doc for generics event
Issue: SPR-13069
2015-06-15 14:37:44 +02:00
Juergen Hoeller 4eea675c15 Stronger warning about lookup methods not working with @Bean
Issue: SPR-13108
2015-06-11 09:58:10 +02:00
Juergen Hoeller a7aaf313d7 Updated CGLIB AOP proxy note on constructor invocations
Issue: SPR-13103
2015-06-08 18:12:58 +02:00
Stephane Nicoll d6056182aa Polish ConditionalGenericConverter documentation
Issue: SPR-13071
2015-06-03 10:31:55 +02:00
Juergen Hoeller d7a361315f Added further core features to 4.2 section 2015-05-22 23:50:22 +02:00
Sam Brannen 57e765f9ca Document annotation improvements & @AliasFor in new-in-4.2 2015-05-22 23:46:28 +02:00
Sam Brannen 9983add0f5 Polish new-in-4.2 section 2015-05-22 23:01:28 +02:00
Sam Brannen 347264e4d9 Add "Testing Improvements" to new-in-4.2 section 2015-05-22 22:53:31 +02:00
Sam Brannen 3a2da3f701 Polish and reorganize new-in-4.2 section 2015-05-22 17:54:10 +02:00
Stephane Nicoll 5a3eea8adb Update what's new section 2015-05-22 16:54:14 +02:00
Rossen Stoyanchev af67bd944b Add 4.2 section to the reference 2015-05-20 16:43:01 -04:00
Rossen Stoyanchev d686f615f6 Fix typo in reference
Issue: SPR-13043
2015-05-18 15:24:21 -04:00
Stephane Nicoll 0b84f137cc Document application event improvements
Issue: SPR-12702
2015-05-18 16:47:48 +02:00
Juergen Hoeller e6f99ffe37 Explicit documentation on defaulting for 'autowire' and 'lazy-init'
Issue: SPR-13038
2015-05-18 16:19:45 +02:00
Juergen Hoeller dc39e3565c Doc example for custom Formatter as alternative to PropertyEditor in @InitBinder method
Issue: SPR-7773
2015-05-13 15:47:45 +02:00
Kazuki Shimizu 7926dea352 Modify to use the ConfigurableApplicationContext in reference document
Issue: SPR-13000
2015-05-09 10:25:06 +09:00
Rossen Stoyanchev 2b528bb643 Improve and update docs on MvcUriComponentsBuilder
Issue: SPR-12617
2015-05-07 10:43:57 -04:00
Sam Brannen a89c0ecf5d Fix broken cross-references in reference manual 2015-05-07 14:21:40 +02:00
Sebastien Deleuze 2b2186781b Fix JSON Views code sample in the documentation
Issue: SPR-12994
2015-05-07 10:23:01 +02:00
Kazuki Shimizu edc66d76af Improve description of DefaultLobHandler in reference manual
Issue: SPR-12985
2015-05-06 19:40:12 +02:00
Sam Brannen 250aef81e4 Merge pull request #791 from kazuki43zoo/SPR-12990
Ensure image of OXM exceptions hierarchy is displayed in reference manual

Issue: SPR-12990
2015-05-06 19:03:20 +02:00
Sam Brannen 2015781ea1 Rename duplicate EnvironmentIntegrationTests to EnvironmentSystemIntegrationTests 2015-05-06 15:55:20 +02:00
Sam Brannen 61bfb5a2e7 Merge pull request #789 from kazuki43zoo/SPR-12987
Remove discussion of classic ORM APIs (JDO/JPA) from reference manual
2015-05-06 14:04:47 +02:00
Sam Brannen c9d4e4eab8 Merge pull request #790 from kazuki43zoo/SPR-12988
Refer to EclipseLink instead of TopLink in reference manual
2015-05-06 13:21:20 +02:00
Sam Brannen 6584a53bcb Merge pull request #792 from kazuki43zoo/SPR-12992
Remove unnecessary RemoteAccountService example from reference manual
2015-05-06 13:18:15 +02:00
Kazuki Shimizu 702fb08dd5 Modify typo in reference document
* AccountServletEndpoint -> AccountServiceEndpoint

Issue: SPR-12993
2015-05-06 19:31:31 +09:00
Kazuki Shimizu e3bd728088 Remove the RemoteAccountService
Issue: SPR-12992
2015-05-06 19:15:25 +09:00
Kazuki Shimizu fc415a28e7 Modify to disply the image of oxm exceptions hierarchy
Issue: SPR-12990
2015-05-06 15:42:30 +09:00
Kazuki Shimizu 7fdd3f39d6 JpaDialect description replace to EclipseLink from Toplink
Issue: SPR-12988
2015-05-06 04:46:40 +09:00
Kazuki Shimizu 91ac6fc716 Remove descriptions of classic ORM API(JDO/JPA)
Issue: SPR-12987
2015-05-06 03:18:51 +09:00
Sam Brannen 76faa2c6d2 Merge pull request #787 from kazuki43zoo/SPR-12980
Do not refer to deprecated ParameterizedBeanPropertyRowMapper in reference manual

Change to the BeanPropertyRowMapper from the ParameterizedBeanPropertyRowMapper
2015-05-05 14:52:14 +02:00
Sam Brannen 123e7c14eb Merge pull request #785 from kazuki43zoo/SPR-12979
Fix description of JdbcTemplate's resultsMapCaseInsensitive support in reference manual
2015-05-05 14:35:45 +02:00
Kazuki Shimizu 9dc64244b5 Change to the BeanPropertyRowMapper from the ParameterizedBeanPropertyRowMapper
Issues: SPR-12980
2015-05-05 21:28:49 +09:00
Kazuki Shimizu 9fe2f4f9dd Fixes bad grammar in reference document
Issue: SPR-12981
2015-05-05 21:21:06 +09:00
Kazuki Shimizu 9ed34b81fd Fixes description of JdbcTemplate#setResultsMapCaseInsensitive
Issue: SPR-12979
2015-05-05 17:58:21 +09:00
Rossen Stoyanchev 9637b12f89 Fix typo
Issue: SPR-12962
2015-05-04 09:52:27 -04:00
Sebastien Deleuze a3159dfbf2 Add script based templating support
This commit adds support for script based templating. Any templating
library running on top of a JSR-223 ScriptEngine that implements
Invocable like Nashorn or JRuby could be used.

For example, in order to render Mustache templates thanks to the Nashorn
Javascript engine provided with Java 8+, you should declare the following
configuration:

@Configuration
@EnableWebMvc
public class MustacheConfig extends WebMvcConfigurerAdapter {

	@Override
	public void configureViewResolvers(ViewResolverRegistry registry) {
		registry.scriptTemplate();
	}

	@Bean
	public ScriptTemplateConfigurer configurer() {
		ScriptTemplateConfigurer configurer = new ScriptTemplateConfigurer();
		configurer.setEngineName("nashorn");
		configurer.setScripts("mustache.js");
		configurer.setRenderObject("Mustache");
		configurer.setRenderFunction("render");
		return configurer;
	}
}

The XML counterpart is:

<beans>
	<mvc:annotation-driven />

	<mvc:view-resolvers>
		<mvc:script-template />
	</mvc:view-resolvers>

	<mvc:script-template-configurer engine-name="nashorn" render-object="Mustache" render-function="render">
		<mvc:script location="mustache.js" />
	</mvc:script-template-configurer>
</beans>

Tested with:
 - Handlebars running on Nashorn
 - Mustache running on Nashorn
 - React running on Nashorn
 - EJS running on Nashorn
 - ERB running on JRuby
 - String templates running on Jython

Issue: SPR-12266
2015-04-22 08:47:04 +02:00
Rossen Stoyanchev c29eae3307 Support user destinations with multiple app servers
This change adds support for broadcasting messages with unresolved
user destinations so that other servers can try to resolve it.
That enables sending messages to users who may be connected to a
different server.

Issue: SPR-11620
2015-04-17 11:55:44 -04:00
Stephane Nicoll 2c7d2d38a9 Support custom resolution of response destination
Previously, the "pubSubDomain" drove the resolution of both the
destination of the listener and the default response destination.

A new "replyPubSubDomain" attribute has been added on the base listener
and  can be used to listen on a topic and reply to a queue (or vice
versa). The attribute is exposed via the "response-destination-type" XML
attribute on the listener container element. It is also available on the
JmsListenerContainerFactory for use with the @JmsListener infrastructure.

Issue: SPR-12911
2015-04-16 17:29:48 +02:00
David Tombs 463878a03f Improve RedirectAttributes reference docs
The use of RedirectAttributes was documented in four places in the
reference documentation. This commit merges some of the places and links
properly between them.

Issue: SPR-12759
2015-04-13 13:41:58 -04:00
Sam Brannen 81a2cbb100 Polish HTTP caching sections in reference manual 2015-03-31 01:09:44 +02:00
Juergen Hoeller 7e22623758 Clarification: Lifecycle does not imply auto-startup semantics
Issue: SPR-12855
2015-03-30 21:06:12 +02:00
Rossen Stoyanchev 867971de89 Add STOMP client documentation
Issue: SPR-12814
2015-03-26 22:45:15 -04:00
Rossen Stoyanchev b620f34ad8 Minor doc update 2015-03-24 16:45:51 -04:00
Rossen Stoyanchev 209e8de188 Document async request processing enhancements
Generally update chapter and add documentation for 4.2 including
the return value types ResponseBodyEmitter, SseEmitter, and
StreamingResponseBody.

Issue: SPR-12672
2015-03-24 16:05:28 -04:00
Rossen Stoyanchev 95f6e4cc9b Support StreamingResponseBody return value type
Issue: SPR-12831
2015-03-23 15:38:52 -04:00
Brian Clozel 90ed0cf04c Document HTTP caching features in 4.2
Issue: SPR-11792
2015-03-23 18:05:53 +01:00
Brian Clozel 7fa4ac1cf8 Externalize javadoc-baseurl asciidoctor attribute
The `javadoc-baseurl` asciidoctor attribute is now externalized
(i.e. not included directly in the document anymore).

This allows to properly render javadoc links in single pages, whereas
those URLs were previoulsy only supported in the single page version.
2015-03-23 18:05:53 +01:00
Sam Brannen e086a637d5 Introduce BEFORE METHOD/CLASS modes in @DirtiesContext
Prior to this commit, @DirtiesContext could only be used to close a
test ApplicationContext after an entire test class or after a test
method; however, there are some use cases for which it would be
beneficial to close a test ApplicationContext before a given test class
or test method -- for example, if some rogue (i.e., yet to be
determined) test within a large test suite has corrupted the original
configuration for the ApplicationContext.

This commit provides a solution to such testing challenges by
introducing the following modes for @DirtiesContext.

 - MethodMode.BEFORE_METHOD: configured via the new methodMode attribute

 - ClassMode.BEFORE_CLASS and ClassMode.BEFORE_EACH_TEST_METHOD: both
   configured via the existing classMode attribute

Issue: SPR-12429
2015-03-22 21:33:20 +01:00
Brian Westrich 27b57ec332 fix typo 2015-03-14 07:43:02 -05:00
Stephane Nicoll c7fcf7cd4c `@Configuration` doc improvements
Various documentation improvements related to `@Configuration` and
`Bean`. Better describe how method parameter can be used to declare
dependencies of a particular bean. Also add an explicit mentions related
to "hard-wiring" of dependencies in configuration classes.

Issue: SPR-12773
2015-03-09 16:26:41 +01:00
Stephane Nicoll bd6d974561 Fix Admonition syntax
The upgrade to a more recent asciidoc format led to a bunch of of
broken Admonition as the text block now requires four equal signs while
previous versions tolerated only 3.

Issue: SPR-12791
2015-03-07 07:30:52 +01:00
Brian Clozel 74072237ee Break down Core and Web chapters in reference doc
Core and Web chapters are important chapters in the Spring Framework
reference documentation, and splitting them in multiple files will
help to evolve the documentation while not creating too many files.

Issue: SPR-12309
2015-03-06 16:59:25 +01:00