1. 19 11月, 2019 1 次提交
    • S
      Support scoped @ControllerAdvice beans again · 3a39b7fe
      Sam Brannen 提交于
      Spring Framework 5.2 introduced support for implementing the Ordered
      interface in a @ControllerAdvice bean. This support requires that
      @ControllerAdvice beans be eagerly resolved from the BeanFactory in
      order to invoke the getOrder() method defined in the Ordered interface.
      Unfortunately doing so resulted in a regression in that an attempt to
      eagerly resolve a scoped @ControllerAdvice bean throws a
      BeanCreationException due to the lack of an active scope (e.g., request
      or session scope).
      
      This commit fixes this regression by avoiding eager resolution of scoped
      @ControllerAdvice beans. As a direct consequence, the Ordered interface
      is not supported for scoped @ControllerAdvice beans.
      
      Closes gh-23985
      3a39b7fe
  2. 24 6月, 2019 3 次提交
  3. 21 6月, 2019 2 次提交
  4. 20 6月, 2019 1 次提交
  5. 23 3月, 2019 1 次提交
  6. 22 3月, 2019 2 次提交
  7. 14 6月, 2018 1 次提交
  8. 18 10月, 2017 1 次提交
  9. 13 4月, 2017 1 次提交
  10. 29 7月, 2015 1 次提交
    • S
      Introduce 'value' alias for 'attribute' in @AliasFor · 72529208
      Sam Brannen 提交于
      SPR-11512 introduced support for annotation attribute aliases via
      @AliasFor, requiring the explicit declaration of the 'attribute'
      attribute. However, for aliases within an annotation, this explicit
      declaration is unnecessary.
      
      This commit improves the readability of alias pairs declared within an
      annotation by introducing a 'value' attribute in @AliasFor that is an
      alias for the existing 'attribute' attribute. This allows annotations
      such as @ContextConfiguration from the spring-test module to declare
      aliases as follows.
      
      public @interface ContextConfiguration {
      
           @AliasFor("locations")
           String[] value() default {};
      
           @AliasFor("value")
           String[] locations() default {};
      
          // ...
      }
      
      Issue: SPR-13289
      72529208
  11. 22 5月, 2015 1 次提交
    • S
      Support annotation attribute aliases and overrides via @AliasFor · ca66e076
      Sam Brannen 提交于
      This commit introduces first-class support for aliases for annotation
      attributes. Specifically, this commit introduces a new @AliasFor
      annotation that can be used to declare a pair of aliased attributes
      within a single annotation or an alias from an attribute in a custom
      composed annotation to an attribute in a meta-annotation.
      
      To support @AliasFor within annotation instances, AnnotationUtils has
      been overhauled to "synthesize" any annotations returned by "get" and
      "find" searches. A SynthesizedAnnotation is an annotation that is
      wrapped in a JDK dynamic proxy which provides run-time support for
      @AliasFor semantics. SynthesizedAnnotationInvocationHandler is the
      actual handler behind the proxy.
      
      In addition, the contract for @AliasFor is fully validated, and an
      AnnotationConfigurationException is thrown in case invalid
      configuration is detected.
      
      For example, @ContextConfiguration from the spring-test module is now
      declared as follows:
      
          public @interface ContextConfiguration {
      
              @AliasFor(attribute = "locations")
              String[] value() default {};
      
              @AliasFor(attribute = "value")
              String[] locations() default {};
      
              // ...
          }
      
      The following annotations and their related support classes have been
      modified to use @AliasFor.
      
      - @ManagedResource
      - @ContextConfiguration
      - @ActiveProfiles
      - @TestExecutionListeners
      - @TestPropertySource
      - @Sql
      - @ControllerAdvice
      - @RequestMapping
      
      Similarly, support for AnnotationAttributes has been reworked to
      support @AliasFor as well. This allows for fine-grained control over
      exactly which attributes are overridden within an annotation hierarchy.
      In fact, it is now possible to declare an alias for the 'value'
      attribute of a meta-annotation.
      
      For example, given the revised declaration of @ContextConfiguration
      above, one can now develop a composed annotation with a custom
      attribute override as follows.
      
          @ContextConfiguration
          public @interface MyTestConfig {
      
              @AliasFor(
                 annotation = ContextConfiguration.class,
                 attribute = "locations"
              )
              String[] xmlFiles();
      
              // ...
          }
      
      Consequently, the following are functionally equivalent.
      
      - @MyTestConfig(xmlFiles = "test.xml")
      - @ContextConfiguration("test.xml")
      - @ContextConfiguration(locations = "test.xml").
      
      Issue: SPR-11512, SPR-11513
      ca66e076
  12. 05 12月, 2014 1 次提交
  13. 17 12月, 2013 1 次提交
  14. 27 11月, 2013 1 次提交
    • P
      General polish of new 4.0 classes · 15698860
      Phillip Webb 提交于
      Apply consistent styling to new classes introduced in Spring 4.0.
      
      - Javadoc line wrapping, whitespace and formatting
      - General code whitespace
      - Consistent Assert.notNull messages
      15698860
  15. 19 10月, 2013 1 次提交
  16. 18 10月, 2013 1 次提交
    • B
      Add new features on @ControllerAdvice · c4a8bf9c
      Brian Clozel 提交于
      Prior to this commit, @ControllerAdvice annotated beans would
      assist all known Controllers, by applying @ExceptionHandler,
      @InitBinder, and @ModelAttribute.
      
      This commit updates the @ControllerAdvice annotation,
      which accepts now base package names, assignableTypes,
      annotations and basePackageClasses.
      
      If attributes are set, only Controllers that match those
      selectors will be assisted by the annotated class.
      This commit does not change the default behavior when
      no value is set, i.e. @ControllerAdvice().
      
      Issue: SPR-10222
      c4a8bf9c
  17. 28 8月, 2012 1 次提交
    • R
      Polish standard Spring MVC exception handling · da05b094
      Rossen Stoyanchev 提交于
      Rename ExceptionHandlerSupport to ResponseEntityExceptionHandler and
      emphasize the contrast to DefaultHandlerExceptionResovler -- i.e.
      one returns a ResponseEntity and relies on message converters while
      the other returns a ModelAndView and relies on view resolution.
      
      Issue: SPR-9290
      da05b094
  18. 15 8月, 2012 1 次提交
    • R
      Introduced ControllerAdvice annotation · e65b930e
      Rossen Stoyanchev 提交于
      Classes with this annotation can contain @ExceptionHandler,
      @InitBinder, and @ModelAttribute methods that apply to all controllers.
      The new annotation is also a component annotation allowing
      implementations to be discovered through component scanning.
      
      Issue: SPR-9112
      e65b930e
  19. 30 4月, 2012 1 次提交
    • S
      Fix javadoc warnings · effb7625
      Stevo Slavic 提交于
      Before this change there were numerous javadoc warnings being reported
      while building Spring framework API.
      
      This commit resolves most of the javadoc warnings, reducing the total
      number from 265 to 103.
      
      Issue: SPR-9113
      effb7625
  20. 31 1月, 2012 1 次提交
    • C
      Rename modules {org.springframework.*=>spring-*} · 02a4473c
      Chris Beams 提交于
      This renaming more intuitively expresses the relationship between
      subprojects and the JAR artifacts they produce.
      
      Tracking history across these renames is possible, but it requires
      use of the --follow flag to `git log`, for example
      
          $ git log spring-aop/src/main/java/org/springframework/aop/Advisor.java
      
      will show history up until the renaming event, where
      
          $ git log --follow spring-aop/src/main/java/org/springframework/aop/Advisor.java
      
      will show history for all changes to the file, before and after the
      renaming.
      
      See http://chrisbeams.com/git-diff-across-renamed-directories
      02a4473c
  21. 17 11月, 2011 1 次提交
  22. 29 6月, 2011 1 次提交
  23. 31 7月, 2009 1 次提交
  24. 18 11月, 2008 1 次提交