Polishing (backported from master)

This commit is contained in:
Juergen Hoeller
2021-04-13 11:48:55 +02:00
parent bb530dca5b
commit 43071109f7
2 changed files with 7 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -72,7 +72,7 @@ public class AcceptHeaderLocaleResolver implements LocaleResolver {
/**
* Configure a fixed default locale to fall back on if the request does not
* have an "Accept-Language" header.
* <p>By default this is not set in which case when there is "Accept-Language"
* <p>By default this is not set in which case when there is no "Accept-Language"
* header, the default locale for the server is used as defined in
* {@link HttpServletRequest#getLocale()}.
* @param defaultLocale the default locale to use

View File

@@ -10657,9 +10657,8 @@ architectures that build upon the well-known Spring programming model.
[[context-functionality-events-annotation]]
==== Annotation-based Event Listeners
As of Spring 4.2, you can register an event listener on any public method of a managed
bean by using the `@EventListener` annotation. The `BlockedListNotifier` can be rewritten as
follows:
You can register an event listener on any method of a managed bean by using the
`@EventListener` annotation. The `BlockedListNotifier` can be rewritten as follows:
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
.Java
@@ -10797,9 +10796,9 @@ method signature to return the event that should be published, as the following
NOTE: This feature is not supported for
<<context-functionality-events-async, asynchronous listeners>>.
This new method publishes a new `ListUpdateEvent` for every `BlockedListEvent` handled by the
method above. If you need to publish several events, you can return a `Collection` of events
instead.
The `handleBlockedListEvent()` method publishes a new `ListUpdateEvent` for every
`BlockedListEvent` that it handles. If you need to publish several events, you can return
a `Collection` or an array of events instead.
[[context-functionality-events-async]]