Commit Graph

24006 Commits

Author SHA1 Message Date
rstoyanchev d7ab5b4132 Refactor HttpRequestSpec to HttpRequestValues
HttpRequestValues is immutable and exposes a builder.

See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev 564f8ba7a0 Update after review
See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev bb44c0e13a Polishing
See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev 4bddbd30c4 Polishing contribution
See gh-28386
2022-04-27 21:21:43 +01:00
Olga Maciaszek-Sharma c2a008fc22 Add HttpMethod and PathVariable argument resolvers
See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev c418768f05 Add @HttpRequest and HttpServiceProxyFactory
See gh-28386
2022-04-27 21:21:43 +01:00
Stephane Nicoll 5378572b00 Clarify lambda code block methods 2022-04-26 15:13:43 +02:00
Stephane Nicoll f64fc4baff Generate appropriate bean registration code for scoped proxies
Closes gh-28383
2022-04-26 15:03:54 +02:00
Stephane Nicoll 7ea0cc3da2 Allow BeanRegistrationContributionProvider to access the BeanFactory
Closes gh-28384
2022-04-26 15:02:54 +02:00
Arjen Poutsma 88eac7794c Merge branch '5.3.x' 2022-04-26 11:58:34 +02:00
Arjen Poutsma b6b03f38d7 Updated .sdkmanrc 2022-04-26 11:54:02 +02:00
Stephane Nicoll 26054fd3d4 AOT contribution for @PersistenceContext and @PersistenceUnit
Closes gh-28364
2022-04-25 11:01:09 +02:00
Stephane Nicoll 10d254983f Refine MultiStatement#toClodeBlock
Closes gh-28363
2022-04-25 09:13:50 +02:00
Stephane Nicoll ccb66247ce Merge branch '5.3.x' 2022-04-24 10:05:35 +02:00
Stephane Nicoll 46b0d7dc03 Merge pull request #28369 from izeye
* pr/28369:
  Add Javadoc since for GraphQL constants

Closes gh-28369
2022-04-24 10:05:28 +02:00
izeye fcf64798b5 Add Javadoc since for GraphQL constants
See gh-28369
2022-04-24 09:58:50 +02:00
Stephane Nicoll b4f4fd71c9 Merge branch '5.3.x' 2022-04-24 09:57:16 +02:00
Stephane Nicoll 94ed07d9cb Merge pull request #28372 from zhangmingqi09
* pr/28372:
  Update copyright year of changed file
  Fix github issue reference in RequestMappingHandlerMapping

Closes gh-28372
2022-04-24 09:57:02 +02:00
Stephane Nicoll b81c62d064 Update copyright year of changed file
See gh-28372
2022-04-24 09:56:39 +02:00
zhangmingqi09 ca1a11acac Fix github issue reference in RequestMappingHandlerMapping
See gh-28372
2022-04-24 09:55:20 +02:00
Arjen Poutsma be7fa3aaa8 Introduce PartEvent
This commit introduces the PartEvent API. PartEvents are either
- FormPartEvents, representing a form field, or
- FilePartEvents, representing a file upload.

The PartEventHttpMessageReader is a HttpMessageReader that splits
multipart data into a stream of PartEvents. Form fields generate one
FormPartEvent; file uploads produce at least one FilePartEvent. The last
element that makes up a particular part will have isLast set to true.

The PartEventHttpMessageWriter is a HttpMessageWriter that writes a
Publisher<PartEvent> to a outgoing HTTP message. This writer is
particularly useful for relaying a multipart request on the server.

Closes gh-28006
2022-04-20 11:00:07 +02:00
Sam Brannen 081c6463e9 Polish Javadoc for PathVariableMapMethodArgumentResolver 2022-04-16 17:57:44 +02:00
dugenkui03 ffffa055f0 Return UnmodifiableMap in MVC PathVariableMapMethodArgumentResolver
See gh-28127
Closes gh-28352
2022-04-16 17:57:44 +02:00
Stephane Nicoll f40a391916 Fix handling of reflection target name in TypeReference
This commit adds a `getName` to `TypeReference` that provides a way to
generate the reflection target name of a type. This typically handle
primitives (omitting the `java.lang` packages) and arrays.

Closes gh-28347
2022-04-15 11:47:25 +02:00
Stephane Nicoll 7820804bf6 Allow registration of bean factory contributors via spring.factories
Closes gh-28342
2022-04-14 15:11:48 +02:00
Stephane Nicoll 8b97c2dc9d Polish 2022-04-14 14:56:08 +02:00
Stephane Nicoll 95f24c0897 Merge branch '5.3.x' 2022-04-14 14:11:41 +02:00
Stephane Nicoll c261d40610 Merge pull request #28340 from koenpunt
* pr/28340:
  Update copyright year of changed file
  Fix method reference in Kotlin documentation

Closes gh-28340
2022-04-14 14:11:28 +02:00
Stephane Nicoll 3017955eff Update copyright year of changed file
See gh-28340
2022-04-14 14:09:54 +02:00
Koen Punt 22c82ff206 Fix method reference in Kotlin documentation
See gh-28340
2022-04-14 14:09:02 +02:00
Brian Clozel 38019d2249 Allow static registration of RuntimeHints
Prior to this commit, we could only contribute `RuntimeHints` through
two mechanisms:
* `AotContributingBeanFactoryPostProcessor`, consdering the entire
  `BeanFactory` and designed for contributing both code and hints.
* `AotContributingBeanPostProcessor`, consdering beans one by one, but
  also designed for contributing both code and hints.

There are cases where libraries and applications want to contribute
`RuntimeHints` only, in a more static fashion: a dependency being
present, or a piece of infrastructure being considered by the
application context are good enough signals to contribute hints about
resources or reflection.

This commit adds the `RuntimeHintsRegistrar` contract for these cases.
Implementations can be declared as `spring.factories` and they will be
processed as soon as they're detected on the classpath. They can also be
declared with `@ImportRuntimeHints` and they will be processed if the
annotated bean definition is considered in the application context.
This annotation should be mainly used on configuration classes and on
bean methods.

```
@Configuration
@ImportRuntimeHints(CustomRuntimeHintsRegistrar.class)
public class MyConfiguration {

  @Bean
  @ImportRuntimeHints(OtherRuntimeHintsRegistrar.class)
  public MyBean myBean() {
    //...
  }
}
```

Closes gh-28160
2022-04-14 13:06:43 +02:00
Brian Clozel 591aa7f64b Merge branch '5.3.x' 2022-04-14 11:04:42 +02:00
Jerome Prinet f54952481b Update Gradle Enterprise plugin to 3.9
Closes gh-28338
2022-04-14 11:04:22 +02:00
Stephane Nicoll 5be6b3d2a7 Add shortcut method to register multiple types hints
Closes gh-28339
2022-04-14 10:22:07 +02:00
Stephane Nicoll 780d07217b Hide builder implementations in RuntimeHints API 2022-04-14 10:05:38 +02:00
Stephane Nicoll c28fd91a10 Merge branch '5.3.x' 2022-04-13 12:17:47 +02:00
Johannes Wengert 08bc9edcbc
Use "instanceof pattern matching" in sample in reference docs
Closes gh-28332
2022-04-13 12:16:10 +02:00
Spring Builds 9e733b09e2 Next development version (v5.3.20-SNAPSHOT) 2022-04-13 09:24:33 +00:00
Sam Brannen 1574fed90b Merge branch '5.3.x' 2022-04-13 10:08:31 +02:00
Sam Brannen a7cf19cec5 Improve documentation and matching algorithm in data binders 2022-04-13 09:55:40 +02:00
Juergen Hoeller 8744952424 Merge branch '5.3.x' 2022-04-13 00:28:22 +02:00
Juergen Hoeller 0cf7f7bd89 Polishing 2022-04-13 00:24:23 +02:00
Juergen Hoeller 949c3d450c Align plain accessor check 2022-04-13 00:24:06 +02:00
Arjen Poutsma 6e9a662290 Merge branch '5.3.x' 2022-04-12 16:52:49 +02:00
Arjen Poutsma 3b4ae7b028 TomcatHttpHandlerAdapter continues after 0 bytes
This commit makes sure that TomcatServerHttpRequest::readFromInputStream
follows the same contract as the method it overrides, and returns
AbstractListenerReadPublisher.EMPTY_BUFFER when 0 bytes are read.

See gh-28241
2022-04-12 16:52:13 +02:00
Stephane Nicoll ab7213c823 Merge branch '5.3.x' 2022-04-12 16:14:05 +02:00
Stephane Nicoll 8b39698553 Upgrade to Reactor 2020.0.18
Closes gh-28329
2022-04-12 15:53:10 +02:00
Stephane Nicoll 64570a85b3 Allow DataSize to be initialized at build time
Previously, Graal failed to build a native image as DataSize was
unintentionally initialized at build time. This commit workarounds the
faulty assumption by flagging it as safe to initialize at build-time.

Closes gh-28328
2022-04-12 11:33:45 +02:00
Arjen Poutsma 5fc8a9839c Do not add Accept-Ranges header on client-side
This commit fixes a regression that added the Accept-Ranges header on
both client and server. Accept-Ranges is response header, so we now make
sure it only appears on the server side.

See gh-28291
2022-04-12 10:36:49 +02:00
Stephane Nicoll 3c37fa2edf Polish 2022-04-12 08:01:55 +02:00