Clarify behaviour of AnnotationBeanNameGenerator with acronyms

Name transformation is delegated to Introspector#decapitalize, which
states "but in the (unusual) special case when there is more than one
character and both the first and second characters are upper case, we
leave it alone.". This commit clarifies this behavior.

See gh-2030
This commit is contained in:
Mateusz
2018-11-28 12:21:21 +01:00
committed by Stephane Nicoll
parent 829bed03af
commit 341f4882ed

View File

@@ -47,10 +47,11 @@ import org.springframework.util.StringUtils;
*
* <p>If the annotation's value doesn't indicate a bean name, an appropriate
* name will be built based on the short name of the class (with the first
* letter lower-cased). For example:
* letter lower-cased). If two first letters of class name are uppercase, bean name will be unchanged. For example:
*
* <pre class="code">com.xyz.FooServiceImpl -&gt; fooServiceImpl</pre>
*
* <pre class="code">com.xyz.URLFooServiceImpl -&gt; URLFooServiceImpl</pre>
*
* @author Juergen Hoeller
* @author Mark Fisher
* @since 2.5