Commit Graph

31788 Commits

Author SHA1 Message Date
Sam Brannen
43f8d9e084 Apply 'instanceof pattern matching' 2022-11-22 16:27:34 +01:00
Juergen Hoeller
7816c9e411 Exclude LocalVariableTableParameterNameDiscoverer based on native image check
See gh-29531
2022-11-22 15:37:00 +01:00
Sam Brannen
d32027df92 Apply 'instanceof pattern matching' 2022-11-22 15:11:37 +01:00
Sam Brannen
a832c98ced Polish contribution
See gh-29460
2022-11-22 14:31:49 +01:00
divcon
c12d93c5d1 Polish ServletWebRequest and DefaultServerWebExchange
- The return values of ServletWebRequest.validateIfUnmodifiedSince and
  DefaultServerWebExchange.validateIfUnmodifiedSince are not used. So I
  think that it is better to remove the return statements.

- Add missing @Nullable declarations to eTag method parameters.

- Simplify if statements

Closes gh-29460
2022-11-22 14:30:41 +01:00
Sam Brannen
ca6acfee30 Polishing 2022-11-22 14:24:03 +01:00
jiangying
b130ff36d9 Fix Javadoc link text in BindingResult
Closes gh-29551
2022-11-22 13:38:57 +01:00
Sébastien Deleuze
0b8000eeaa Refine LogAdapter#isPresent
Align LogAdapter#isPresent with ClassUtils#isPresent in order
to catch NoClassDefFoundError and other errors.

Closes gh-29506
2022-11-22 09:44:52 +01:00
Sébastien Deleuze
8350738929 Upgrade to Kotlin 1.7.21
Closes gh-29543
2022-11-22 08:53:10 +01:00
André Gasser
b695687e13 Fix some typos in Kotlin WebClient example code
Closes gh-29538
2022-11-22 08:26:11 +01:00
Sébastien Deleuze
2ba7a553b3 Upgrade to Jackson 2.14.1
Fix an important memory consumption regression, see
https://github.com/FasterXML/jackson-databind/issues/3665
for more details.

Closes gh-29539
2022-11-22 07:30:38 +01:00
Sébastien Deleuze
1e98fb607a Make SourceHttpMessageConverter optional
As a follow-up to gh-29277, and since the JAXB support is now
triggered by the classpath presence of a JAXB implementation,
it makes sense to make SourceHttpMessageConverter, previously
configured unconditionally, optional.

That makes a big difference on native (1M of RSS reduction
with current typical Spring Boot 3 arrangement, 3.4M when
other usages of XML are not reachable).

It also brings more consistency between Spring MVC
and Spring WebFlux, and means that XML support for
Spring web applications now needs to be enabled explicitly.

As a consequence, Spring web applications using
javax.xml.transform.Source now needs to configure
SourceHttpMessageConverter explicitly in RestTemplate or
Spring MVC.

Closes gh-29535
2022-11-21 18:23:26 +01:00
Marten Deinum
c1dfde5ba4 Fix link to Bean Utils Light Library in BeanUtils Javadoc
The URL for the BULL library has changed (not sure when, probably way back).

This updates it to the correct location.

Closes gh-29534
2022-11-21 16:59:30 +01:00
Sam Brannen
917c41fd52 Use Set.of() for constant sets where appropriate 2022-11-21 16:49:07 +01:00
Sam Brannen
0c878d2d06 Apply additional 'instanceof pattern matching' in spring-web
See gh-29530
2022-11-21 15:57:53 +01:00
Sam Brannen
50109dd86d Polish contribution
See gh-29530
2022-11-21 15:57:53 +01:00
divcon
99ae209c25 Apply 'instanceof pattern matching' in spring-web
Closes gh-29530
2022-11-21 14:29:24 +01:00
Sébastien Deleuze
64c6a97130 Make GeneratorStrategy.generate unreachable on native
This change provides also more information to the user
about the missing generated class when that happens.

Closes gh-29521
2022-11-21 13:04:20 +01:00
Sam Brannen
2112e86795 Revert "Ensure source code in framework-docs is compiled in the build"
This reverts commit c45f8b7072.
2022-11-21 12:55:49 +01:00
Sébastien Deleuze
f4e23fe204 Do not use LocalVariableTableParameterNameDiscoverer in AOT mode
Closes gh-29531
2022-11-21 11:50:08 +01:00
Sébastien Deleuze
04366f4129 Update LogAdapter to allow build-time code removal
Allow for example to remove those classes and 90 related methods when Logback is used:
- org.apache.commons.logging.LogAdapter$JavaUtilAdapter
- org.apache.commons.logging.LogAdapter$JavaUtilLog
- org.apache.commons.logging.LogAdapter$LocationResolvingLogRecord
- org.apache.commons.logging.LogAdapter$Log4jAdapter
- org.apache.commons.logging.LogAdapter$Log4jLog
- org.apache.commons.logging.LogAdapter$LogApi
- org.apache.logging.log4j.message.ObjectMessage
- org.apache.logging.log4j.message.ReusableObjectMessage
- org.apache.logging.log4j.simple.SimpleLoggerContext
- org.apache.logging.log4j.simple.SimpleLoggerContextFactory

Closes gh-29506
2022-11-21 11:49:48 +01:00
David Costanzo
2a2c679f66 Fix a syntax error in an XML listing by adding a missing double-quote
Closes gh-29456
2022-11-20 19:21:53 +01:00
Sam Brannen
32a5830543 Ensure code listing callouts are displayed incorrectly in core-beans.adoc
Closes gh-29457
2022-11-20 19:17:34 +01:00
Sam Brannen
9378493d83 Polish ref docs 2022-11-20 19:16:27 +01:00
Sam Brannen
da12481ef1 Polish ref docs
- stop referring to Java Config as new
- stop referring to Struts 2.x as if it were new
- polish AOT documentation
- etc.
2022-11-19 17:16:43 +01:00
Sam Brannen
c45f8b7072 Ensure source code in framework-docs is compiled in the build
This also ensures that the source code can be properly imported into an
IDE.
2022-11-19 16:43:47 +01:00
Sam Brannen
60243dbbac Polish asciidoc attributes 2022-11-19 16:43:47 +01:00
Sam Brannen
fb1f0eccfb Reinstate chapter asciidoc attribute for Web MVC 2022-11-19 16:43:47 +01:00
Sam Brannen
c0602fd071 Introduce appendix in Testing chapter in the reference manual
This commit moves the Annotations and Further Resources sections to the
new Appendix.

See gh-29522
2022-11-19 14:59:34 +01:00
divcon
870e856554 Fix link to WebFlux section in reference manual
Closes gh-29525
2022-11-19 14:42:55 +01:00
Sam Brannen
b9656ac6c0 Polishing 2022-11-19 14:38:39 +01:00
Sam Brannen
de441b4751 Remove TODOs in WebFlux ref docs 2022-11-19 14:38:01 +01:00
Sam Brannen
9c3efdec32 Fix broken link to Web MVC Testing section 2022-11-19 14:37:29 +01:00
Brian Clozel
af40a124bb Disable checkstyle for reference docs code snippets 2022-11-18 18:24:43 +01:00
Brian Clozel
44c583392e Document RuntimeHints testing strategies
Closes gh-29523
2022-11-18 18:11:35 +01:00
Sam Brannen
9249dc3d37 Reorganize and modularize the Testing chapter in the reference manual
Closes gh-29522
2022-11-18 17:33:40 +01:00
Sam Brannen
3458f293d4 Polish asciidoc attributes 2022-11-18 15:42:27 +01:00
Sam Brannen
796b8c1278 Polishing 2022-11-18 15:14:14 +01:00
Sam Brannen
cefd74555a Polish contribution 2022-11-18 15:07:08 +01:00
wizard
e9555d4825 Polish AbstractAutowireCapableBeanFactory and use instanceof pattern matching
Closes gh-29499
2022-11-18 15:00:05 +01:00
Brian Clozel
1960666765 Set error status in Observation Servlet filter
Prior to this commit, the Observation Servlet filter would record
unhandled exceptions on the observation context but would leave the
default HTTP response status as is.
Servlet containers do set the response status in that case to 500 by
default. Not doing that at the Servlet filter level results in invalid
observations, stating that the HTTP response status is 200 (because the
error status hasn't been set yet by the container) and as a result, the
outcome is SUCCESS.

This commit ensures that the error status is set in those cases,
aligning the behavior with Servlet containers.

Fixes gh-29512
2022-11-18 14:15:49 +01:00
Stephane Nicoll
45dc1d2602 Fix link to WebFlux section
Closes gh-29513
2022-11-18 10:47:27 +01:00
Sébastien Deleuze
ef5796c3a9 Update documentation to mention Java 17+ baseline
Closes gh-29514
2022-11-18 09:43:41 +01:00
Sébastien Deleuze
b52300eab8 Document GraalVM substitutions upcoming removal 2022-11-17 18:01:02 +01:00
Sam Brannen
031adfb8ec Use lambda expression for Callable example in ref docs 2022-11-17 17:13:50 +01:00
Arjen Poutsma
792371ac1f Generalize Jackson version numbers
This commit removes specific version info from Jackson codecs and
converters, in favor of generic info or removing the version information
all together.

See gh-29508
2022-11-17 16:56:38 +01:00
Brian Clozel
62bbebd4f4 Polishing 2022-11-17 16:55:53 +01:00
Sam Brannen
ac7d428a62 Work around code example callout bug
This commit adds callouts to two sets of Java/Kotlin code examples in
the @ModelAttribute section for Web MVC in order to work around the
"Code example has callout from a different code example" bug.

This also aligns the Web MVC examples with the WebFlux examples.

As a side note, the bug can also be seen in the WebFlux documentation
if the callouts are removed from the first Java/Kotlin examples in the
@ModelAttribute section for WebFlux. Thus it appears to be a general
issue related to examples within a given section of the documentation
when some examples have callouts and others do not, likely due to a bug
in the Javascript that provides this feature.

See gh-29505
2022-11-17 16:37:08 +01:00
Sam Brannen
f6eaa8e63c Add missing callouts 2022-11-17 16:36:40 +01:00
Sam Brannen
cd27fbe550 Add callouts to Kotlin examples for parity 2022-11-17 16:36:40 +01:00