1. 30 5月, 2011 15 次提交
  2. 28 5月, 2011 1 次提交
  3. 26 5月, 2011 1 次提交
    • C
      Upgrade javax.servlet dependency to 3.0 for .web · 367a0c29
      Chris Beams 提交于
      In support of SPR-7672 which will support code-based configuration
      alternatives to web.xml using new features in the Servlet 3.0 API.
      
      This upgrade does *not* force Spring users to upgrade to Servlet 3.0
      capable containers.  Compatibility with and support for
      javax.servlet >= 2.4 remains.
      
      Issue: SPR-7672
      367a0c29
  4. 25 5月, 2011 8 次提交
  5. 24 5月, 2011 3 次提交
  6. 23 5月, 2011 9 次提交
    • C
      Delegate parent environment to child app contexts · c4363673
      Chris Beams 提交于
      Calls to AbstractApplicationContext#setParent delegate the parent
      context environment to the child.
      
      This ensures that any property sources added to the parent are available
      to the child as well as ensuring that any profiles activated are
      activated everywhere.
      
      Child contexts may still choose to replace their environment (through an
      ApplicationContextInitializer, for example).  In any case, however, in
      the root/child web application context relationship established by
      ContextLoader + DispatcherServlet, the child is guaranteed to have
      already been given the parent environment by the time it is delegated
      to any ACIs.
      
      See AbstractApplicationContext#setParent for implementation
      
      See FrameworkServlet#createWebApplicationContext for order in which
      setParent then initializeWebApplicationContext are called.
      
      Issue: SPR-8185
      c4363673
    • C
      Introduce AnnotationConfigCapableApplicationContext · c696e195
      Chris Beams 提交于
      AnnotationConfigApplicationContext and
      AnnotationConfigWebApplicationContext both expose #register and #scan
      methods as of the completion of SPR-8320. This change introduces a new
      interface that declares each of these methods and refactors ACAC and
      ACWAC to implement it.
      
      Beyond information value, this is useful for implementors of the
      ApplicationContextInitializer interface, in that users may create an ACI
      that works consistently across ACAC and ACWAC for standalone (e.g.
      testing, batch) or web (e.g. production) use.
      
      Issue: SPR-8365,SPR-8320
      c696e195
    • C
      Introduce AnnotationConfigWAC #scan and #register · e128ee24
      Chris Beams 提交于
      Primarily for use in conjunction with ApplicationContextInitializer,
      these new #scan and #register methods mirror those in
      AnnotationConfigApplicationContext. #setConfigLocation
      and #setConfigLocations methods remain for compatibility with
      ContextLoader-style initialization, but have been locally overridden
      and documented clearly.
      
      AnnotationConfigWebApplicationContext#loadBeanDefinitions Javadoc has
      also been updated to explain the processing logic for each of these
      potential inputs.
      
      Issue: SPR-8320
      e128ee24
    • C
      Support "contextInitializerClasses" init-param · 56720fc4
      Chris Beams 提交于
      FrameworkServlet now has support equivalent to ContextLoader and its
      "contextInitializerClasses" context-param introduced in 3.1 M1.
      
      This allows users to specify ApplicationContextInitializers at the root
      (ContextLoader) level and/or at the DispatcherServlet level.
      
      Issue: SPR-8366
      56720fc4
    • C
      Polish FrameworkServlet Javadoc; fix warnings · 3c6254df
      Chris Beams 提交于
      3c6254df
    • K
      SPR-8364 · 7430fcd9
      Keith Donald 提交于
      7430fcd9
    • K
      revised findCommonElement handling within TypeDescriptor.forObject(Object); we... · 5c67dbf4
      Keith Donald 提交于
      revised findCommonElement handling within TypeDescriptor.forObject(Object); we now fully introspect the collection elements to resolve the common type.  We also support nested introspection e.g. collections of collections.  Object.class is used to indicate no common type, and TypeDescriptor.NULL is used to indicate a null element value
      5c67dbf4
    • K
    • K
      SPR-8364 · 4d6a5849
      Keith Donald 提交于
      4d6a5849
  7. 21 5月, 2011 3 次提交
    • C
      Guard against null in #visitInnerClass · 4a6101a6
      Chris Beams 提交于
      Issue: SPR-8358,SPR-8186
      4a6101a6
    • C
      Register nested @Configuration classes automatically · 95b1dbad
      Chris Beams 提交于
      The following is now possible:
      
      @Configuration
      public class AppConfig {
          @Inject DataSource dataSource;
      
          @Bean
          public MyBean myBean() {
              return new MyBean(dataSource);
          }
      
          @Configuration
          static class DatabaseConfig {
              @Bean
              DataSource dataSource() {
                  return new EmbeddedDatabaseBuilder().build();
              }
          }
      }
      
      public static void main(String... args) {
          AnnotationConfigApplicationContext ctx =
              new AnnotationConfigApplicationContext(AppConfig.class);
          ctx.getBean(MyBean.class);     // works
          ctx.getBean(DataSource.class); // works
      }
      
      Notice that the @Import annotation was not used and that only AppConfig
      was registered against the context. By virtue of the fact that
      DatabaseConfig is a member class of AppConfig, it is automatically
      registered when AppConfig is registered. This avoids an awkward and
      redundant @Import annotation when the relationship is already implicitly
      clear.
      
      See @Configuration Javadoc for details.
      
      Issue: SPR-8186
      95b1dbad
    • C
      Introduce ClassMetadata#getMemberClassNames · 5b2c7c4e
      Chris Beams 提交于
      ClassMetadata implementations can now introspect their member (nested)
      classes. This will allow for automatic detection of nested
      @Configuration types in SPR-8186.
      
      Issue: SPR-8358,SPR-8186
      5b2c7c4e