1. 08 5月, 2019 25 次提交
    • S
      Support automatic constructor injection in JUnit Jupiter · 77eef474
      Sam Brannen 提交于
      Prior to this commit, dependency injection of all arguments in a test
      class constructor invoked by JUnit Jupiter was only possible if the
      constructor was explicitly annotated with @Autowired.
      
      This commit introduces support for a configurable "test constructor
      autowire" mode which defaults to false in order to remain backwards
      compatible.
      
      Specifically, this mode can be configured globally for an entire test
      suite via a new "spring.test.constructor.autowire" JVM system property
      that can alternatively be configured via the SpringProperties
      mechanism. In addition, the global "test constructor autowire" mode can
      be overridden locally on a per-class basis via the new @TestConstructor
      annotation.
      
      Closes gh-22286
      77eef474
    • J
      Fix JDK 9+ generics compilation problem in TransactionAspectSupport · eb16e853
      Juergen Hoeller 提交于
      Includes consistent mentioning of ReactiveTransactionManager in javadoc.
      
      Closes gh-22923
      eb16e853
    • A
      Javadoc · dc01917d
      Arjen Poutsma 提交于
      dc01917d
    • A
      MultipartIntegrationTests should not bind to same part multiple times · 2352688c
      Arjen Poutsma 提交于
      DefaultMultipartMessageReader does not cache the part contents, so
      binding to the same part multiple times does not work.
      Rewrote this test to use separate HTTP request instead.
      2352688c
    • A
      Add way to override default multipartReader · e7cca779
      Arjen Poutsma 提交于
      This commit introduces a way to override the default multipart reader,
      for instance to the SynchronossPartHttpMessageReader.
      e7cca779
    • A
      Add logging to DefaultMultipartMessageReader · 32915d8b
      Arjen Poutsma 提交于
      32915d8b
    • A
      Add reference counting for UndertowDataBuffer · e625ace8
      Arjen Poutsma 提交于
      This commit adds proper reference counting to the UndertowDataBuffer.
      e625ace8
    • R
      Empty body checks in ConsumesRequestCondition · 45147c23
      Rossen Stoyanchev 提交于
      Normally consumes matches the "Content-Type" header but what should be done if
      there is no content? This commit adds checks for method parameters with
      @RequestBody(required=false) and if "false" then also match requests with no content.
      
      Closes gh-22010
      45147c23
    • J
      Nullability refinements and related polishing · cdf51c3d
      Juergen Hoeller 提交于
      cdf51c3d
    • J
      Nullability refinements and related polishing · c5b38483
      Juergen Hoeller 提交于
      Includes fix for typo in visitor class names.
      
      See gh-22909
      c5b38483
    • P
      Deprecate StandardMetadata constructors · 7031964e
      Phillip Webb 提交于
      Deprecate the public `StandardMetadata` constructors to make it clearer
      that these classes should not be instantiated directly. A new
      `AnnotationMetadata.introspect` factory method has been added which
      can now be used to obtain instances.
      
      This change will allow use to make the constructors package private
      and drop the `nestedAnnotationsAsMap` parameter in a future release.
      
      Closes gh-22906
      7031964e
    • P
      Add SimpleAnnotationMeta classes and readers · 7fbf3f97
      Phillip Webb 提交于
      Replace the existing ASM based readers with new implementations that
      also support MergedAnnotations. The meta-data classes themselves are
      now immutable, and constructed via separate reader classes.
      
      The `SimpleMetadataReader` class has been updated to return the new
      classes, however the old ones remain since some of them are public
      and might be being used directly.
      
      Closes gh-22884
      7fbf3f97
    • P
      Add MergedAnnotations support to meta-data classes · 8c2ccfe6
      Phillip Webb 提交于
      Add `AnnotatedTypeMetaData.getAnnotations()` that can be used to access
      annotation details using the `MergedAnnotations` interface.
      
      Where possible, the existing annotation methods have been migrated to
      call `getAnnotation()`, rather than needing their own implementation.
      
      The existing ASM based meta-data implementations have not been updated
      since they will be deprecated and replaced in a subsequent commit.
      
      See gh-22884
      8c2ccfe6
    • P
      Reduce meta-data code duplicate with default methods · 30ba80a3
      Phillip Webb 提交于
      Extract and pull-up some common method implementations and make them
      default methods of the interface.
      
      See gh-22884
      30ba80a3
    • P
      Add additional class/method meta-data tests · f592c1f2
      Phillip Webb 提交于
      Add some additional tests to provide more coverage of class and method
      meta-data support.
      
      See gh-22884
      f592c1f2
    • P
      Use ReflectionUtils to get declared methods · 9738e488
      Phillip Webb 提交于
      Update `StandardAnnotationMetadata` to use `ReflectionUtils` when
      obtaining declared methods. This update is primarily so that the common
      method cache can be used.
      
      Closes gh-22907
      9738e488
    • P
      Skip java.lang.annotations when reading metadata · 1fa59378
      Phillip Webb 提交于
      Update `StandardAnnotationMetadata` and `AnnotationMetadataReadingVisitor`
      so that `java.lang.annotation` annotations are consistently skipped.
      
      Closes gh-22885
      1fa59378
    • P
      Don't expose RetentionPolicy.CLASS annotations · 8a293f51
      Phillip Webb 提交于
      Update ASM based metadata readers so that only RetentionPolicy.RUNTIME
      annotations are exposed. This aligned behavior with the reflection based
      implementation.
      
      Closes gh-22886
      8a293f51
    • P
      Add MergedAnnotations.of method · 9d6cf57c
      Phillip Webb 提交于
      Add a factory method to `MergedAnnotation` that allows an instance to
      be created for an explicit collection of root annotations. This method
      will allow ASM based readers to expose a `MergedAnnotation` instance
      that has root annotations loaded from bytecode, and meta-annotations
      loaded using reflection.
      
      See gh-22884
      9d6cf57c
    • P
      Support String->Class adaptation in MergedAnnotation · daec3531
      Phillip Webb 提交于
      Update TypeMappedAnnotation so that Strings can be used to represent
      Class attribute values. This will allow ASM annotation readers to
      present a `MergedAnnotation` instance without necessarily having the
      actual class values on the classpath.
      
      When the underlying value is a String, any calls to
      `getValue(name, String.class)` or `asMap(Adapt.CLASS_TO_STRING)` will
      simply return the original String. Calls that need the actual Class
      result (such as `getClass`) will use `Class.forName` and may throw
      a `ClassNotFoundException` at that point.
      
      This commit also allows an empty Object[] to be used to represent
      any empty primitive array.
      
      See gh-22884
      daec3531
    • P
      Polishing MergedAnnotation code · e11990e6
      Phillip Webb 提交于
      e11990e6
    • P
      Rename some MergedAnnotation `from` methods to `of` · d4a761ab
      Phillip Webb 提交于
      Rename `from` to `of` for the `MergedAnnotation` factory methods that
      work with Maps. The previous name was a little confusing, especially
      when an annotation source parameter was specified. The new method name
      helps to make it clearer when the user is explicitly defining the
      attributes of the annotation, as opposed to picking them up from the
      source.
      d4a761ab
    • P
      Add MergedAnnotation.getTypeHierarchy method · 3b145a5a
      Phillip Webb 提交于
      Add a `getTypeHierarchy()` method to `MergedAnnotation` that can be used
      to return the full type hierarchy information. This method is
      specifically designed to be used in combination with
      `MergedAnnotationPredicates.unique`.
      
      This update also allows us to delete the `parentAndType` method
      from `AnnotatedElementUtils`.
      
      Closes gh-22908
      3b145a5a
    • P
      Extract integration test classes from package-info · f86affe4
      Phillip Webb 提交于
      Extract the inner classes from package-info into their own files to
      prevent local build problems and to make them easier to find.
      f86affe4
    • J
      Properly detect importing class metadata for lite configuration class · fff3813d
      Juergen Hoeller 提交于
      Closes gh-22920
      fff3813d
  2. 07 5月, 2019 15 次提交