You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It states that As there is no replacement for this method, in 5.2.x it is necessary to set it to {@code false}. In 5.3 the default changes to {@code false} and use of this property becomes unnecessary.
But the default value of favorPathExtension still is true.
If the property is not used, path extension will be favored indicating that a call to setFavorPathExtension(false) is still necessary, contrary to the deprecation note.
The text was updated successfully, but these errors were encountered:
I believe the intent was to turn off path extensions completely in 5.3, both for content-type and for suffix pattern matching. This is also based on the fact that a deprecation on a method does not mean much if you must use it to achieve the recommended configuration. I'll take a closer look at correcting this in 5.3.2.
rstoyanchev
changed the title
Deprecation Note On ContentNegotiationManagerFactoryBean Is Misleading
Deprecation note on setFavorPathExtension does not match actual default
Nov 19, 2020
rstoyanchev
changed the title
Deprecation note on setFavorPathExtension does not match actual default
Update default for favorPathExtension to match the Javadoc and as was intended for 5.3
Nov 24, 2020
rstoyanchev
changed the title
Update default for favorPathExtension to match the Javadoc and as was intended for 5.3
Update default for favorPathExtension to match Javadoc and as intended for 5.3
Nov 24, 2020
I have changed the default setting of favorPathExtension so that now both path extensions are not checked and suffix pattern matching is not used by default.
For applications that need to revert back for the time being:
Affected Version:
Spring Web 5.3.1
.Deprecation note on ContentNegotiationManagerFactoryBean:setFavorPathExtension(boolean) is misleading.
spring-framework/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBean.java
Lines 164 to 177 in 6a0377b
It states that
As there is no replacement for this method, in 5.2.x it is necessary to set it to {@code false}. In 5.3 the default changes to {@code false} and use of this property becomes unnecessary.
But the default value of
favorPathExtension
still istrue
.spring-framework/spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBean.java
Line 111 in 6a0377b
If the property is not used, path extension will be favored indicating that a call to
setFavorPathExtension(false)
is still necessary, contrary to the deprecation note.The text was updated successfully, but these errors were encountered: