Commit Graph

638 Commits

Author SHA1 Message Date
Sam Brannen dbbd1dacef Update Eclipse formatter settings for Java source code
- Copyright end date is now dynamic, based on the current year.

 - Added missing spaces in front of web link to ASL 2.0 license file.

 - Changed @since tag to 4.2.
2015-01-08 18:39:03 +01:00
Sam Brannen fc38d3bf06 Set source and target to JDK 1.8 for Eclipse projects 2015-01-08 18:33:33 +01:00
Stephane Nicoll 6790f55667 Fix typo 2015-01-01 11:42:00 +01:00
Sam Brannen 40449e2741 Suppress warnings in tests
This commit suppresses warnings in test classes that were polluting the
Gradle build output.
2014-12-31 02:10:30 +01:00
Juergen Hoeller 3791e7f653 TimeZone and ZoneId as supported arguments for MVC handler methods
Issue: SPR-12575
2014-12-29 16:41:31 +01:00
Juergen Hoeller 6f2de283c4 Doc: base-packages can be comma/semicolon/space/tab/linefeed-separated
Issue: SPR-12523
2014-12-29 13:39:48 +01:00
Stephane Nicoll 752bbbdd05 Fix scope inheritance documentation
Issue: SPR-12570
2014-12-29 10:54:19 +01:00
Sebastien Deleuze a770b151d9 Specify SockJS protocol and client supported versions
In order to avoid breaking changed due to the upcoming SockJS 1.0
release (see SPR-12422 for more details) and link to the right
SockJS documentation version, we now explicitly specify that we
support SockJS protocol 0.3.3 and SockJS client 0.3.x.
2014-12-26 22:38:49 +01:00
Stephane Nicoll c4049a989a Better doc reference of CachingConfigurer
Update the documentation to better reflect the fact that a @EnableCaching
configuration class must implement CachingConfigurer in order to provide
advanced customizations to the cache abstraction.
2014-12-22 11:37:44 +01:00
Sam Brannen 3125ef784c Polish documentation for inferred bean destruction mode 2014-12-18 13:41:59 +01:00
Stephane Nicoll 6ff2abcb83 Document destroy method name inference
Update the developer guide to explicitly reference the (inferred)
constant introduced in 38e90105a0.

Also emphasis the fact that the (inferred) mode is enabled by default
with Java config and how to disable it if necessary.

Issue: SPR-12534
2014-12-18 11:10:17 +01:00
Sam Brannen 866d8fea0d Polish grammar and wording in the reference manual 2014-12-10 14:47:15 +01:00
Sam Brannen b0a72b311f Polish Spring Framework Artifacts table
Issue: SPR-12517
2014-12-10 13:54:04 +01:00
Sebastien Deleuze 1f6a15e4da List Spring Framework artifacts in the reference manual
Issue: SPR-12517
2014-12-10 10:52:12 +01:00
Sebastien Deleuze 67f1967eee Polish reference manual
This commit put more emphasis on Spring Boot in the
"Getting Started" section, and update some outdated excerpts.
2014-12-10 10:52:12 +01:00
Sebastien Deleuze 84ef269d54 Remove outdated reference to Spring Modules 2014-12-09 15:29:24 +01:00
Rossen Stoyanchev 03f5176df1 List Tomcat and Jetty Web first. 2014-12-05 12:19:06 -05:00
Sebastien Deleuze ea7f787ad8 Update supported WebSocket runtimes in the reference documentation 2014-12-05 17:13:33 +01:00
Stephane Nicoll 2602bcbb7c Fix typo 2014-11-24 15:57:18 +01:00
Stephane Nicoll 0d00b674f4 Fix documentation formatting
Using the "quotes" substitution group by default leads to side effect
when the "*" character is used. This is especially true for AOP pointcut
or for MVC mappings.

Plain verbatim might work most of the time unless you intend to highlight
a piece of code or a comment.

Issue: SPR-12456
2014-11-24 15:55:54 +01:00
Gary Russell 4942c5c1fb Add Id to JmsListenerEndpoint Docs
Issue: SPR-12425
2014-11-13 15:51:12 +01:00
Juergen Hoeller 6a96850aa7 Polishing 2014-11-06 14:29:43 +01:00
Sam Brannen da04362a5e Log context cache statistics in the TCF
Prior to this commit, finding out how many application contexts had
been loaded within a test suite required the use of reflection and a
bit of hacking.

This commit addresses this issue by logging ContextCache statistics
whenever an application context is loaded by the Spring TestContext
Framework (TCF).

The log output can be enabled by setting the
"org.springframework.test.context.cache" logging category to DEBUG.

Issue: SPR-12409
2014-11-03 15:26:44 +01:00
Sebastien Deleuze 8b5fda5ad9 Use unversioned XSD links in code examples 2014-11-03 15:03:03 +01:00
Stephane Nicoll 6534d0035d Add documentation for the keep-alive flag
This commit updates the documentation of the task:executor element to
reference the keep-alive flag.

Issue: SPR-12407
2014-11-03 14:50:16 +01:00
Rossen Stoyanchev 62620de3f1 Update log settings for spring-websocket tests 2014-10-29 18:18:01 -04:00
Juergen Hoeller ffc4e03293 Removed outdated TimerTaskExecutor reference
Issue: SPR-12389
2014-10-29 11:21:23 +01:00
Rossen Stoyanchev a377878038 Minor doc update
Issue: SPR-12375
2014-10-27 17:27:24 -04:00
Juergen Hoeller 03bd08a6a5 Corrected note on JPA <exclude-unlisted-classes>
Issue: SPR-10767
2014-10-27 11:59:26 +01:00
Sebastien Deleuze 58f4014b17 Add an option to disable automatic addition of CORS header
Issues: SPR-12283
2014-10-26 21:20:53 +01:00
Rossen Stoyanchev d5eb669416 Add mention of java.util.Optional in @MVC
Issue: SPR-12370
2014-10-23 16:53:00 -04:00
Rossen Stoyanchev df090235bb Update documentation for Map arguments
Issue: SPR-12347
2014-10-22 22:17:51 -04:00
Juergen Hoeller aaf69eb1f1 Fix outdated references to JobDetailBean
Issue: SPR-12306
2014-10-07 12:42:17 +02:00
Oleg Lomaka abb45aa130 Fix reference code sample 2014-10-07 09:41:50 +02:00
Sam Brannen 12a2813e2a Change gopivotal.com to pivotal.io
This commit changes email addresses and URLs so that they point to
pivotal.io instead of gopivotal.com.
2014-10-05 18:12:50 +02:00
Stephane Nicoll a86402899d polishing 2014-10-01 16:02:29 +02:00
Anders D. Johnson bc0e59f689 Fix condition vs. conditional typo in documenation
Issue: SPR-12273
2014-09-30 09:48:53 +02:00
Sebastien Deleuze a3fd00eadb Improve @JsonView reference documentation
Issue: SPR-12270
2014-09-30 05:44:51 +02:00
Sam Brannen 38777955d2 Escape single quotes in the reference manual
This commit ensures that single quotes nested in double quotes in
code examples in the reference manual are properly escaped using ''.

Issue: SPR-12246
2014-09-24 19:12:33 +02:00
Sam Brannen 07ffb6ffed Polish SpEL compiler section 2014-09-24 14:12:40 +02:00
Sam Brannen 75291b32bc Fix grammar in @JsonView section 2014-09-24 13:10:31 +02:00
Sam Brannen 2a0fb1b684 Fix broken links to JIRA issues 2014-09-24 13:07:51 +02:00
Sam Brannen b31c95df85 Polish code formatting in testing chapter 2014-09-24 13:04:47 +02:00
Brian Clozel 983b5338ed Fix typo in documentation
Issue: SPR-8025
2014-09-22 18:38:19 +02:00
Brian Clozel ea034aeb2e Reorder list of data access modules in documentation
Issue: SPR-7689
2014-09-22 18:38:19 +02:00
Brian Clozel 09a6afb94c Fix "file:///" URL schema in documentation
Issue:  SPR-7735
2014-09-22 18:38:19 +02:00
Juergen Hoeller 94e26fd72d Remove outdated references to ContextLoaderServlet
Issue: SPR-7725
2014-09-22 17:51:38 +02:00
Rossen Stoyanchev b1e9577680 Ensure single quotes appear in documentation sample
Issue: SPR-12186
2014-09-18 14:52:41 -04:00
Rossen Stoyanchev c9c3857eae Update section on resource handler config
Issue: SPR-14036
2014-09-04 01:13:53 -04:00
Juergen Hoeller 20c2ba35dc Polishing 2014-09-04 00:55:38 +02:00
Rossen Stoyanchev 50846e3288 Update reference 2014-09-03 13:09:24 -04:00
Sebastien Deleuze 06f1f495c2 Update reference documentation for JSONP support
Issue: SPR-12113
2014-09-03 11:25:22 +02:00
Rossen Stoyanchev 7885a5975e Add section on building controller links from views 2014-09-03 00:30:25 -04:00
Rossen Stoyanchev 51a550b27b Add mention of ResponseBodyAdvice 2014-09-03 00:04:50 -04:00
Rossen Stoyanchev 3a8f30613d Update the what's new section 2014-09-03 00:04:49 -04:00
Andy Clement 8bf141eca9 Documentation updates describing SpEL compiler usage 2014-09-02 17:30:54 -07:00
Sam Brannen 1f6c40fd86 Polish recent changes to reference manual 2014-09-02 22:38:20 +02:00
Juergen Hoeller 98eb0f75bc Polishing 2014-09-02 22:15:53 +02:00
Sebastien Deleuze 041479a0d5 Add Web Improvements to what's new in Spring 4.1 section 2014-09-02 15:47:24 +02:00
Brian Clozel 5490168037 List all spring-framework artifacts in Modules
This change adds the artifacts names in the Spring Framework Modules
documentation. Linking both concepts make it easier to decide which
Spring module should be importer in an application's build.

Issue: SPR-11534
2014-09-02 14:34:07 +02:00
Stephane Nicoll fafb2fce2f Improve what's new in Spring 4.1 section 2014-09-01 18:26:59 +02:00
Sam Brannen ede97d99ea Add 'new in Spring 4.1' section to reference manual
This commit introduces a new-in-4.1 section in the reference manual with
initial content for testing improvements.
2014-09-01 03:16:51 +02:00
Sam Brannen 4c2aa6adc6 Document support for merging TELs with defaults
This commit restructures the content of the "TestExecutionListener
registration and ordering" section of the Testing chapter in the
reference manual into cross-referenced subsections with more
appropriate titles.

In addition, this commit introduces a new "Merging
TestExecutionListeners" subsection which documents the new MergeMode
feature in @TestExecutionListeners, including an example demonstrating
the MERGE_WITH_DEFAULTS mode.

Issue: SPR-12083
2014-09-01 02:35:29 +02:00
Sam Brannen 7cd615c4f9 Document automatic discovery of default TELs
This commit introduces a new "TestExecutionListener registration and
ordering" section in the Testing chapter of the reference manual.

Issue: SPR-12082
2014-09-01 01:33:58 +02:00
Sam Brannen 10c5827956 Improve text for xref links in the reference manual 2014-08-31 23:23:16 +02:00
Sam Brannen cdc522242f Document programmatic tx mgt support in the TCF
This commit introduces a new "Programmatic transaction management"
section in the Testing chapter of the reference manual with an example
highlighting the new support provided via TestTransaction.

In addition, this commit begins the work to be addressed more
thoroughly in SPR-11399 by overhauling the entire "Transaction
management" section with in-depth discussions on the following topics.

 - Test-managed transactions
 - Enabling and disabling transactions
 - Transaction rollback and commit behavior
 - Executing code outside of a transaction
 - Configuring a transaction manager

Issue: SPR-11941, SPR-11399
2014-08-31 22:53:43 +02:00
Sam Brannen 9926badb33 Document @TestPropertySource support in the reference manual
This commit introduces a new "Context configuration with test property
sources" section in the Testing chapter of the reference manual.

In addition, the "Context caching" section has been updated regarding
support for test property source locations and properties in
MergedContextConfiguration.

Issue: SPR-12076
2014-08-31 21:05:42 +02:00
Sam Brannen d4f5901f1f Document Groovy script support in the TCF
This commit documents support for using Groovy scripts to load
ApplicationContexts using the Spring TestContext Framework (TCF) in the
reference manual.

Issue: SPR-12027
2014-08-31 19:02:21 +02:00
Sam Brannen 3220d46776 Document @Sql script support in the reference manual
- Introduced a new "Executing SQL scripts" section in the Testing
   chapter with a subsection covering programmatic script execution via
   ResourceDatabasePopulator, ScriptUtils, etc. and a subsection
   dedicated to the new declarative support via @Sql.

 - Documented @Sql, @SqlConfig, and @SqlGroup in the "Annotations" and
   "Meta-annotation" sections.

 - Fixed broken cross-reference links to "false positives" with ORM tip.

 - Documented methods in JdbcTestUtils.

 - Improved layout and information in sections covering
   AbstractTransactionalJUnit4SpringContextTests and
   AbstractTransactionalTestNGSpringContextTests.

Issue: SPR-11849
2014-08-31 17:17:04 +02:00
Sam Brannen 5857cef026 Revise JUnit vs. Spring timeout support in reference manual
Prior to this commit, the discussion of JUnit vs. Spring with regard to
timeout support in tests erroneously claimed that Spring's support for
JUnit's @Test(timeout=...) did not include set up and tear down or
repetitions. This information, however, was based on a previous version
of SpringJUnit4ClassRunner and is no longer valid.

This commit revises the affected section of the testing chapter in the
reference manual accordingly.
2014-08-30 02:03:47 +02:00
Sam Brannen ac164088d6 Fix typos in reference manual
manger --> manager
2014-08-30 01:40:19 +02:00
Stephane Nicoll eee8184b29 Update documentation
This commit updates the documentation to mention that the #result
object is available in the SpEL context for computing the key to use
for a @CachePut operation.

Issue: SPR-12125
2014-08-27 15:31:28 +02:00
Stephane Nicoll 15f496bc2a Document environment abstraction
This commit replace the two empty "chapters" dedicated to profiles
and property source to an 'Environment abstraction' chapter that
covers both.

Issue: SPR-12107
2014-08-25 15:26:26 +02:00
Sebastien Deleuze 6665634675 Support Jackson based XML serialization/deserialization
This commit adds support for XML serialization/deserialization based on
the jackson-dataformat-xml extension. When using @EnableWebMvc or
<mvc:annotation-driven/>, Jackson will be used  by default instead of JAXB2
if jackson-dataformat-xml classes are found in the classpath.

This commit introduces MappingJackson2XmlHttpMessageConverter and
MappingJackson2XmlView classes, and common parts between JSON
and XML processing have been moved to AbstractJackson2HttpMessageConverter
and AbstractJackson2View classes.

MappingJackson2XmlView supports serialization of a single object. If the model
contains multiple entries, MappingJackson2XmlView.setModelKey() should be
used to specify the entry to serialize.

Pretty print works in XML, but tests are not included since a Woodstox dependency
is needed, and it is better to continue testing spring-web and spring-webmvc
against JAXB2.

Issue: SPR-11785
2014-08-13 16:22:58 +02:00
Juergen Hoeller f1f1c4c980 Remove outdated IDE, JIRA and Tomcat references
Issue: SPR-7521
2014-08-12 16:32:20 +02:00
Sebastien Deleuze f56000b825 Replace http by https for spring.io links in the reference documentation 2014-08-12 11:15:55 +02:00
Sebastien Deleuze 01cbf9b9ee Update references to SpringSource in the reference documentation 2014-08-12 10:31:41 +02:00
Stephane Nicoll d100eef829 Cache documentation in multi-threaded environment
Issue: SPR-9588
2014-08-11 16:01:38 +02:00
Stephane Nicoll c0ea87010f Improve destination-type documentation
Issue: SPR-12073
2014-08-11 15:43:45 +02:00
Stephane Nicoll a635c36470 Fix doc typo 2014-08-08 13:17:55 +02:00
Andy Clement 095bd99951 Add support for inline maps in SpEL expressions
This commit introduces the ability to specify an inline map in
an expression. The syntax is similar to inline lists and of
the form: "{key:value,key2:value}". The keys can optionally
be quoted. The documentation is also updated with information
on the syntax.

Issue: SPR-9472
2014-08-06 11:15:11 -07:00
Stephane Nicoll d6b1cdc55f Custom cache annotations and AspectJ
This commit clarifies what should be done in order to use custom cache
annotations with AspectJ.

Issue: SPR-11503
2014-08-04 17:26:01 +02:00
Stephane Nicoll 3c72849ee4 Fix broken link 2014-08-04 14:45:35 +02:00
Stephane Nicoll 59c5d7d1ca Add messaging module section
Issue: SPR-11847
2014-08-04 14:41:52 +02:00
Rossen Stoyanchev fe88b6e054 Add to SockJsClient reference documentation
Issue: SPR-12006
2014-08-01 16:57:13 -04:00
Sebastien Deleuze 28c70baf61 Add documentation for Java SockJS client
Issue: SPR-12006
2014-08-01 16:57:13 -04:00
Rossen Stoyanchev 25decee1a4 Polish 2014-07-31 17:47:24 -04:00
Sebastien Deleuze 87273d1b83 Enrich documentation with details on how to filter messages
Issue: SPR-11952
2014-07-31 17:47:24 -04:00
Rossen Stoyanchev 70ccbbfab1 Fix documentation issue for user destinations
Issue: SPR-11992
2014-07-31 17:12:32 -04:00
Rossen Stoyanchev e4182da4eb Add section on path pattern comparison
Issue: SPR-10576
2014-07-31 16:28:00 -04:00
Rossen Stoyanchev f50cb06dc2 Polish 2014-07-29 17:58:16 -04:00
Sebastien Deleuze 20c9a8bad4 Improve documentation for using "." as destination separator
Issue: SPR-12007
2014-07-29 17:17:40 -04:00
Rossen Stoyanchev 8e38b7ede6 Add section on web security
Issue: SPR-6125
2014-07-29 16:56:37 -04:00
Stephane Nicoll b6389a6c66 Jms request/reply operations
This commit updates JmsMessagingTemplate to support the
MessageRequestReplyOperation interface that provides synchronous
request/reply operations.

As JmsMessagingTemplate delegates everything under the scenes to
JmsTemplate, the latter has been updated as well to offer such lower
level operation.

Issue: SPR-12037
2014-07-28 15:52:50 +02:00
Juergen Hoeller d4fe732f46 Typo fixes and cleanup of outdated Java 5 references
Issue: SPR-12020
2014-07-24 17:00:44 +02:00
Stephane Nicoll db5cebc681 Fix typo 2014-07-23 17:30:15 +02:00
Rossen Stoyanchev 829d204663 MVC config doc updates 2014-07-18 09:18:34 -04:00
Sebastien Deleuze 7412d43acd Update documentation with MVC config view resolution examples
Issue: SPR-11989
2014-07-18 09:18:34 -04:00
Rossen Stoyanchev 29c6c9a375 Add guidance on URI vars and suffix pattern matching
Issue: SPR-11728
2014-07-18 00:41:38 -04:00
Rossen Stoyanchev ab2526a586 Update support for using "." as path separator
Issue: SPR-11660
2014-07-14 18:49:25 -04:00
Stephane Nicoll 29bdbceaa2 Customize concurrency at listener level
Prior to this commit, customizing the concurrency to use fo a given JMS
listener involved to define it in a specific listener-container. As
this is quite restrictive, users may stop using the XML namespace
support altogether to fallback on regular abstract bean definition for
the container.

This commit adds a concurrency attribute to the jms and jca listener
element as well as on the @JmsListener annotation. If the value is set,
it takes precedence; otherwise the value provided by the factory is
used.

Issue: SPR-11988
2014-07-14 15:49:31 +02:00
Rossen Stoyanchev 48236be4a2 STOMP and WebSocket messaging related logging updates
This change removes most logging at INFO level and also ensures the
amount of information logged at DEBUG level is useful, brief, and
not duplicated.

Also added is custom logging for STOMP frames to ensure very readable
and consise output.

Issue: SPR-11934
2014-07-09 00:39:59 -04:00
Rossen Stoyanchev ab4864da2a Add STOMP/WebSocket stats collection
This change adds collection of stats in key infrastructure components
of the WebSocket message broker config setup and exposes the gathered
information for logging and viewing (e.g. via JMX).

WebSocketMessageBrokerStats is a single class that assembles all
gathered information and by default logs it once every 15 minutes.
Application can also easily expose to JMX through an MBeanExporter.

A new section in the reference documentation provides a summary of
the available information.

Issue: SPR-11739
2014-07-09 00:39:47 -04:00
Stephane Nicoll e20ac27fb4 Fix mutually exclusive use of CachePut and Cacheable
Commit eea230f introduced a regression by adding a support for the
"result" variable in SpEL expression for @CachePut. As such expressions
cannot be evaluated upfront anymore, any method that contains both
@Cacheable and @CachePut annotations are always executed even when
their conditions are mutually exclusive.

This is an example of such mutual exclusion

@Cacheable(condition = "#p1", key = "#p0")
@CachePut(condition = "!#p1", key = "#p0")
public Object getFooById(Object id, boolean flag) { ... }

This commit updates CacheEvaluationContext to define a set of
unavailable variables. When such variable is accessed for a given
expression, an exception is thrown. This is used to restore the
evaluation of the @CachePut condition upfront by registering "result"
as an unavailable variable.

If all @CachePut operations have been excluded by this upfront check,
the @Cacheable operation is processed as it was before. Such upfront
check restore the behavior prior to eea230f.

Issue: SPR-11955
2014-07-07 14:18:19 +02:00
Juergen Hoeller b5a5fffdfd Reference documentation covers application scope now
Issue: SPR-11944
2014-07-03 22:26:24 +02:00
Stephane Nicoll 62351e0f6e Fix wrong method signature in documentation
Issue: SPR-11945
2014-07-03 17:00:25 +02:00
Rossen Stoyanchev 1c91a52639 Add STOMP subscribe/unscubscribe ApplicationContext events
Issue: SPR-11813
2014-06-28 11:07:42 -04:00
Juergen Hoeller f966bf683c Explicitly mention BeanPostProcessor declaration requirements with @Bean methods
Issue: SPR-11906
2014-06-25 12:44:17 +02:00
Sam Brannen b4e16eacc5 Require JUnit 4.9 or higher in the TCF
Prior to this commit, the Spring TestContext Framework (TCF) was
compatible with JUnit 4.5 or higher.

This commit effectively raises the minimum version of JUnit that is
officially supported by the TCF to JUnit 4.9, thereby aligning with
similar upgrades made in the Spring Framework 4.0 release (i.e.,
upgrading minimum requirements on third-party libraries to versions
released mid 2010 or later).

Issue: SPR-11908
2014-06-25 10:10:25 +02:00
Brian Clozel cff36d68b1 update documentation with latest forum infos
Forums will be shortly deactivated and questions should take place
in StackOverflow.
2014-06-19 15:33:06 +02:00
Stephane Nicoll 9ba9f562f2 Add @ComponentScan documentation
This commit provides a proper documentation for the @ComponentScan
annotation as a java config alternative to <context:component-scan/>

Issue: SPR-11846
2014-06-11 11:51:10 +02:00
Stephane Nicoll 6b6b008c1f Fix typo
Issue: SPR-11862
2014-06-10 16:51:13 +02:00
Stephane Nicoll 5cc779ab35 Fix callout formatting issue 2014-06-10 10:58:05 +02:00
Stephane Nicoll c7b106577f polishing
Reorganized class structure to match our code style (setter for
properties at the top of the class, public method before private
implementation).

Removed DisposableBean as it the lifecycle is already taking care
of removing MBeans on stop.

Cleaned test suite

Issue: SPR-8045
2014-06-10 10:13:58 +02:00
Juergen Hoeller af4621d996 Reference documentation consistently refers to Apache HttpComponents instead of outdated Commons HttpClient
Includes overhaul of remaining references to J2SE and J2EE, consistently replacing them with "the JDK" and "Java EE".

Issue: SPR-11853
2014-06-07 00:29:09 +02:00
Vasyl Tretiakov abc377603d Reference manual polishing 2014-06-06 07:57:55 +02:00
Stephane Nicoll 05041ff39a Update JMS documentation
This commit updates the JMS documentation regarding the side effects
of not using the  cache with a non durable subscriber.

Issue: SPR-7883
2014-05-26 10:40:32 +02:00
Gildas Cuisinier 8d306bfbc0 fix javadoc link for RestController and PropertySource 2014-05-24 18:29:52 +02:00
Stephane Nicoll 9952973e01 Add missing cache-resolver attribute
Prior to this commit, CacheResolver could not be configured through
the XML namespace (i.e. cache:annotation-driven). This is now the
case.

Issue: SPR-11490
2014-05-21 09:03:18 +02:00
Stephane Nicoll 05e96ee448 Cache provider related exceptions handling
This commit adds the necessary infrastructure to handle exceptions
thrown by a cache provider in both Spring's and JCache's caching
abstractions.

Both interceptors can be configured with a CacheErrorHandler that
defines several callbacks on typical cache operations. In particular,
handleCacheGetError can be implemented in such a way that an
exception thrown by the provider is handled as a cache miss by the
caching abstraction.

The handler can be configured with both CachingConfigurer and the
XML namespace (error-handler property)

Issue: SPR-9275
2014-05-20 16:39:34 +02:00
Stephane Nicoll 7469159bf1 Add MessageSendingOperations for JMS
This commit adds a JMS implementation of MessageSendingOperations,
allowing to send JMS messages using Spring's standard Messaging
abstraction.

MessagingMessageConverter is a standard JMS's MessageConverter that
can convert Spring's Message to JMS message and vice versa. Existing
infrastructure has been updated to use this implementation.

Issue: SPR-11772
2014-05-19 10:46:13 +02:00
Sebastien Deleuze be0b69cbf1 Add support for Jackson serialization views
Spring MVC now supports Jackon's serialization views for rendering
different subsets of the same POJO from different controller
methods (e.g. detailed page vs summary view).

Issue: SPR-7156
2014-05-15 23:03:33 -04:00
Brian Clozel a072b3f20d Fix RestTemplate documentation for gzip encoding
Prior to this commit, RestTemplate's documentation advised to a
DecompressingHttpClient decorator along with Apache's HttpClient in
order to support gzipped responses.

Since this is now deprecated as of Apache HttpClient 4.3+, this commits
update the documentation with HttpClientBuilder.
2014-05-14 18:04:46 +02:00
Rossen Stoyanchev 2c4cbb617e Add WebSocket scope
This change adds support for a custom "websocket" scope.

WebSocket-scoped beans may be injected into controllers with message
handling methods as well as channel interceptor registered on the
"inboundClientChannel".

Issue: SPR-11305
2014-05-11 12:31:17 -04:00
Stephane Nicoll 89fc3c0257 Add BackOffExecution to isolate state
This commit separates the BackOff configuration from an actual
 execution. BackOffExecution now contains all the state of a
 particular execution and BackOff is only meant to start (i.e.
 create) a new execution.

 The method "reset" has been removed as its no longer necessary:
 when an execution does not need to be used for a given operation
 anymore it can be simply discarded.

 Issue: SPR-11746
2014-05-09 16:39:01 +02:00
Stephane Nicoll 49040a2925 Add back-off attribute to JMS namespace
This commit adds a "back-off" attribute to the jms:listener-container
 element so that a BackOff instance can be provided for users of the
 XML namespace.

 Issue: SPR-11746
2014-05-09 15:05:43 +02:00
Rossen Stoyanchev 97fb308b6b Allow use of @SendToUser even w/o authenticated user
Before this change, subscribing to a user destination and use of
@SendToUser annotation required an authenticated user.

This change makes it possible to subscribe to a user destination from
WebSocket sessions without an authenticated user. In such cases the
destination is associated with one session only rather than with a
user (and all their sessions).

It is then also possible to send a message to a user destination
via "/user/{sessionId}/.." rather than "/user/{user}/...".

That means @SendToUser works relying on the session id of the input
message, effectively sending a reply to destination private to the
session.

A key use case for this is handling an exception with an
@MessageExceptionHandler method and sending a reply with @SendToUser.

Issue: SPR-11309
2014-05-08 22:06:57 -04:00
Stephane Nicoll 7b7fe9aa17 JMS documentation update
This commit updates the documentation of the JMS chapter
with the newly annotated endpoint infrastructure
2014-05-07 12:00:29 +02:00
Stephane Nicoll 6551aa61fa Fix typo
Issue: SPR-11571
2014-05-02 09:57:00 +02:00
Rossen Stoyanchev 676282c66e Support ListenableFuture on @RequestMapping methods
Issue: SPR-11695
2014-05-01 12:28:59 -04:00
Rossen Stoyanchev 26a9c4bc01 Polish STOMP documentation 2014-04-28 22:35:10 -04:00
Sebastien Deleuze 59a050f3b9 Include more guidance about DispatcherServlet context
Also update <mvc:annotation-driven /> comment in XSD.

Issue: SPR-11703
2014-04-28 22:07:55 -04:00
Rossen Stoyanchev 86785f340e Document STOMP-related ApplicationContext events
Issue: SPR-11672
2014-04-28 22:02:45 -04:00
Juergen Hoeller 53162e78e4 WebSocket intro correctly points to annotations section
Issue: SPR-11667
2014-04-16 18:07:25 +02:00
Biju Kunjummen 973780efd5 Minor doc fix to sample for @ConstructorProperties 2014-04-15 18:10:46 +02:00
Stephane Nicoll 1f2d5b5d89 Fix typos 2014-04-09 17:35:45 +02:00
Stephane Nicoll 2b89c1a87e Improve cache abstraction chapter
This commit is a general update of the Cache Abstraction chapter.

Existing sections have been updated with recent improvements made in
that area, in particular:
* Guava and JSR-107 caches support
* New @CacheConfig annotation allowing to share some key customizations
  at class-level
* CacheResolver interface used to resolve the cache(s) to use at
  runtime
* Update section on @CachePut

This commit also describes the support of standard JCache annotations,
i.e. JSR-107.

Issues: SPR-11490, SPR-11316, SPR-10629, SPR-9616, SPR-8696
2014-04-09 11:28:18 +02:00
Sam Brannen 0eba1f818f Use unconstrained quotes in reference manual
Prior to this commit, there were numerous places in the reference
manual, where we would see output similar to the following:

    BeanDefinition`s with the `ApplicationContext

This commit addresses this issue by using unconstrained quotes
(e.g., ++XYZ++s) instead of backticks (e.g., `XYZ`s) when the formatted
text is immediately followed by an "s".

This commit also corrects a few typos and corrects natural English
pluralization of Java code elements in the reference manual where
appropriate -- for example, "@Controllers" becomes "@Controller classes,
etc.

Issue: SPR-11650
2014-04-04 22:02:26 +02:00
Stephane Nicoll db23ec733b Add exception handling of asynchronous method
Prior to this commit, an exception thrown by an @Async void method
was not further processed as there is no way to transmit that
exception to the caller.

The AsyncUncaughtExceptionHandler is a new strategy interface that
can be implemented to handle unexpected exception thrown during the
invocation of such asynchronous method.

The handler can be specified using either the XML namespace or by
implementing the AsyncConfigurer interface with the EnableAsync
annotation.

Issue: SPR-8995
2014-04-02 15:04:40 +02:00
Sam Brannen 1f017c4acb Support classes AND locations in @ContextConfiguration
Prior to this commit, the Spring TestContext Framework did not support
the declaration of both 'locations' and 'classes' within
@ContextConfiguration at the same time.

This commit addresses this in the following manner:

 - ContextConfigurationAttributes no longer throws an
   IllegalArgumentException if both 'locations' and 'classes' are
   supplied to its constructor.

 - Concrete SmartContextLoader implementations now validate the
   supplied MergedContextConfiguration before attempting to load the
   ApplicationContext. See validateMergedContextConfiguration().

 - Introduced tests for hybrid context loaders like the one used in
   Spring Boot. See HybridContextLoaderTests.

 - Updated the Testing chapter of the reference manual so that it no
   longer states that locations and classes cannot be used
   simultaneously, mentioning Spring Boot as well.

 - The Javadoc for @ContextConfiguration has been updated accordingly.

 - Added hasLocations(), hasClasses(), and hasResources() convenience
   methods to MergedContextConfiguration.

Issue: SPR-11634
2014-04-01 19:45:56 +02:00
Stephane Nicoll dcf5f4a6a3 javax.annotation.Priority alternative to @Order
This commit rationalizes the use of @Order so that the standard
@Priority annotation can be used instead. The handling of both
annotations are now defined in OrderUtils.

This also updates the link to the JavaEE API so that we refer to
JavaEE7 instead of JavaEE6.

Issue: SPR-11639
2014-04-01 14:30:47 +02:00
Sam Brannen c924d659eb Update code templates in Eclipse settings
- Copyright is now through 2014.

 - Added "@since 4.1" tag to types.
2014-03-27 11:20:53 +01:00
Rossen Stoyanchev 32852e0843 Improve doc on authentication for stomp/websocket 2014-03-26 17:12:30 -04:00
Rossen Stoyanchev b02bda95b2 Document better ASYNC dispatch type config for Filters
Although the need to map the ASYNC dispatcher type to a Filter was
already mentioned, it wasn't very prominent and can be quite critical
in some cases. This change addresses that.

Issue: SPR-10440
2014-03-26 17:12:10 -04:00
Rossen Stoyanchev e6e12be5ef Fix typo in documentation 2014-03-26 11:32:34 -04:00
Rossen Stoyanchev 5dbcd76a71 Add doc section on configuration and performance
Issue: SPR-11450
2014-03-26 00:20:35 -04:00
Rossen Stoyanchev fd175180b9 Revise section explaining the flow of STOMP messages 2014-03-25 22:15:12 -04:00
Rossen Stoyanchev 84133c86fe Update SockJS overview section and polish 2014-03-25 22:15:12 -04:00
md42 b0e7f72a27 typo in pointcut expression 2014-03-25 17:15:07 +01:00
Sebastien Deleuze d67f0803c4 Update WebSocket engines support documentation 2014-03-25 11:05:47 -04:00