1. 30 Oct, 2015 8 commits
  2. 29 Oct, 2015 15 commits
    • Stephane Nicoll's avatar
      Consistently document default and example values · fd2db51d
      Stephane Nicoll authored
      Previously, the "Common application properties" appendix had no
      consistent use of a configuration key value. It could just as well be
      the default value or an example.
      
      We now always document the default value after the "=" sign and
      eventually add an example with the phrasing "For instance".
      
      The keys have also been reordered so that they follow a natural (i.e.
      lexical) order.
      
      Closes gh-3230
      Closes gh-3160
      Closes gh-3155
      Closes gh-3153
      fd2db51d
    • Andy Wilkinson's avatar
    • Andy Wilkinson's avatar
      Update auto-configured ParameterNamesModule to use DEFAULT creator mode · eaa4d900
      Andy Wilkinson authored
      The PROPERTIES creator mode has the unfortunate side-effect of stopping
      mixins from working. This commit updates the auto-configured module to
      use the DEFAULT creator mode instead.
      
      Closes gh-4336
      eaa4d900
    • Stephane Nicoll's avatar
      Improve meta-data description · 7742dafc
      Stephane Nicoll authored
      7742dafc
    • Andy Wilkinson's avatar
      Update ShellPropertiesTests to expect whitespace to be trimmed · 79d99e18
      Andy Wilkinson authored
      The latest Spring Framework 4.2.3 snapshots appear to be trimming
      whitespace as part of the binding process. This commit updates the
      test's expectations accordingly.
      79d99e18
    • Andy Wilkinson's avatar
      Prevent restarts from switching off Log4J2-based logging · aaae4aa3
      Andy Wilkinson authored
      During a restart, the Restarter runs all registered shutdown hooks. This
      breaks Log4J2 as it leaves it in a shutdown state that leaves logging
      switched off such that no output it produced when the application starts
      up again.
      
      This commit introduces a new RestartListener abstraction.
      RestartListeners are notified prior to the application being restarted.
      A Log4J2-specific implementation is provided that prepares Log4J2 for
      restart by removing any shutdown callbacks from its shutdown callback
      registry. This prevents the restart from shutting down Log4J2, ensuring
      that it still functions when the application restarts.
      
      Closes gh-4279
      aaae4aa3
    • Andy Wilkinson's avatar
      Correct plugin name of ExtendedWhitespaceThrowablePatternConverter · 85d5766d
      Andy Wilkinson authored
      Previously, it had the same plugin name as
      WhitespaceThrowablePatternConverter which meant that only one of the
      two plugins was available and the other’s converter keys didn’t work.
      
      Closes gh-4337
      85d5766d
    • Stephane Nicoll's avatar
      Merge pull request #4316 from klieber/bugfix/oauth2-auth-server-autoconfig · c98d3208
      Stephane Nicoll authored
      * pr/4316:
        Polish contribution
        Add missing properties to OAuth2AutorizationServer
      c98d3208
    • Stephane Nicoll's avatar
      Polish contribution · 10a079fb
      Stephane Nicoll authored
      Closes gh-4316
      10a079fb
    • Kyle Lieber's avatar
      Add missing properties to OAuth2AutorizationServer · c6783e86
      Kyle Lieber authored
      Make sure that `autoApprove`, `accessTokenValiditySeconds`, and
      `refreshTokenValiditySeconds` properties from the `ClientDetails`
      are used
      
      Closes gh-4306
      c6783e86
    • Stephane Nicoll's avatar
      Fix binding of Collection of enum · 6578239f
      Stephane Nicoll authored
      As there is no way to copy all the converters of a `ConversionService` to
      another, `RelaxedConversionService` uses a fallback `ConversionService`
      when the user-provided one failed.
      
      That fallback is taking care of converting `String` to `Enum` in a case
      insensitive way but it has no registered converter to convert a comma
      separated String to a collection of something.
      
      Ironically, our current test suite has plenty of cases where we map a
      `String` to  a collection of enums and they all pass. This is because
      the tests do not provide a custom `ConverterService` so we end up
      immediately in the fallback scenario. Since no converter is able to
      convert the String to a collection, the property editor support of the
      binder takes care of that for us and try to convert each individual
      value.
      
      In a regular use case however, a `ConversionService` is provided and
      fails to map the collection if the String value(s) don't have the exact
      same case as the annotations they represent. Since the original
      `ConversionService` has claimed it was able to convert a collection,
      the raw `String` value is passed to the fallback converter and that one
      fails to convert the raw String.
      
      The fallback converter now registers the necessary converters to
      convert collections. Additional tests have been added to test that in
      a more explicit way.
      
      Closes gh-4322
      6578239f
    • Andy Wilkinson's avatar
      04c87138
    • Dave Syer's avatar
      Be more defensive about exceptions from resource · ae0eed5b
      Dave Syer authored
      Otherwise you can get an exception here that is unuseful, e.g. from
      a ServletContext that isn't properly initialized.
      ae0eed5b
    • Dave Syer's avatar
      Add OAuth2 resource server sample · abd7bc04
      Dave Syer authored
      Shows how to use @EnableResourceServer in a pure resource
      server and configure the secure paths.
      abd7bc04
    • Dave Syer's avatar
      Bump OAuth2 back to 2.0.8 · cd496c7e
      Dave Syer authored
      cd496c7e
  3. 28 Oct, 2015 17 commits
    • Stephane Nicoll's avatar
      Ensure that `@ConfigurationProperties` is mandatory · 3740c817
      Stephane Nicoll authored
      Previously it was possible to bind a bean to the root prefix by just
      adding `@EnableConfigurationProperties` with the class of said bean.
      
       This use case is misleading and prevents any meta-data to be generated
       for that object since the annotation processor reacts on the presence of
       the `@ConfigurationProperties` annotation.
      
       If a class is included in the list of configuration properties bean to
       create via the `@EnableConfigurationProperties` annotation we now make
       sure that the `@configurationProperties` annotation is present on it.
      
       Closes gh-3460
      3740c817
    • Stephane Nicoll's avatar
      Polish doc · 6491eafc
      Stephane Nicoll authored
      `ConfigFileEnvironmentPostProcessor` was renamed to
      `ConfigFileApplicationListener`.
      
      See gh-4258
      6491eafc
    • Andy Wilkinson's avatar
      Drive EnvironmentPostProcessors from ConfigFileApplicationListener · 833aac2b
      Andy Wilkinson authored
      Previously, ConfigFileApplicationListener was listed in spring.factories
      as both an EnvironmentPostProcessor and an ApplicationListener. This
      was problematic as ConfigFileApplicationListener is stateful and listing
      it twice lead to two separate instances with separate state.
      
      This commit restore ConfigFileApplicationListener to only being an
      ApplicationListener. The driving of EnvironmentPostProcessors that was
      performed by EnvironmentPostProcessingApplicationListener is now
      performed by ConfigFileApplicationListener which adds itself as an
      EnvironmentPostProcessor. This ensures that there’s only a single
      instance of ConfigFileApplicationListener, allowing its state to be
      managed correctly.
      
      Closes gh-4258
      833aac2b
    • Andy Wilkinson's avatar
      Consider custom server.context-path when configuring dev tools endpoints · 0adf0374
      Andy Wilkinson authored
      Previously, the auto-configuration of DevTools’ debug, restart, and
      health handlers assumed that the server was running on its default
      context path and, if server.context-path was set to a non-default value,
      the handlers would not work as expected.
      
      This commit updates the auto-configuration of the three handlers to 
      consider the server’s context path when configuring their URIs. Now,
      when a custom server context path is used, no further configuration is
      required other than the inclusion of that context path when providing
      the remote URL as an argument to RemoteSpringApplication.
      
      Closes gh-4301
      0adf0374
    • Stephane Nicoll's avatar
      Merge pull request #4330 from izeye/patch-46 · b5246af1
      Stephane Nicoll authored
      * pr/4330:
        Remove unnecessary String concatenation
      b5246af1
    • Johnny Lim's avatar
      Remove unnecessary String concatenation · f7632226
      Johnny Lim authored
      Closes gh-4330
      f7632226
    • Stephane Nicoll's avatar
      Merge pull request #4317 from vpavic/fix-flyway-baseline-version · 831fa1d3
      Stephane Nicoll authored
      * pr/4317:
        Polish contribution
        Fix binding of Flyway's baselineVersion property
      831fa1d3
    • Stephane Nicoll's avatar
      Polish contribution · 90a4d1df
      Stephane Nicoll authored
      Closes gh-4317
      90a4d1df
    • Vedran Pavic's avatar
      Fix binding of Flyway's baselineVersion property · 40351c40
      Vedran Pavic authored
      See gh-4317
      40351c40
    • Andy Wilkinson's avatar
      Add an integration test to verify filter ordering · 791c50d1
      Andy Wilkinson authored
      We have some requirements for filter ordering:
      
      1. The character encoding filter must go first
      2. Spring Session’s filter should go early
      3. RequestContextFilter should go late so that it any request wrapping
         performed by other filters is reflected in the request that’s set
         in the RequestContextHolder
      4. Spring Security’s Filter must go after RequestContextFilter so that
         any code called by Filters in Spring Security’s Filter chain can
         retrieve the request from RequestContextHolder, for example
         OAuth2ClientContextFilter.
      
      See gh-4331
      791c50d1
    • Stephane Nicoll's avatar
      Merge pull request #4323 from shakuzen/patch-9 · e02bda5f
      Stephane Nicoll authored
      * pr/4323:
        Fix documentation example
      e02bda5f
    • Tommy Ludwig's avatar
      Fix documentation example · 2516dc03
      Tommy Ludwig authored
      Previously, the nested private static class would cause an error at
      startup stating that it was not accessible when trying to bind the
      property from the environment. The nested class should be public.
      
      Closes gh-4323
      2516dc03
    • Stephane Nicoll's avatar
      Merge pull request #4328 from izeye/polish-20151028 · f09bbb5e
      Stephane Nicoll authored
      * pr/4328:
        Polish docs
      f09bbb5e
    • Johnny Lim's avatar
      Polish docs · e2a8fc46
      Johnny Lim authored
      Closes gh-4328
      e2a8fc46
    • Andy Wilkinson's avatar
      Correct the reference to jarfolder in the init script · 1ef68ef2
      Andy Wilkinson authored
      Closes gh-4287
      1ef68ef2
    • Andy Wilkinson's avatar
      Change ordering of deployment tests to keep Cargo happy · f54b5d7a
      Andy Wilkinson authored
      For some reason, Cargo fails when the Tomcat deployment tests are run
      after the TomEE deployment tests. It complains that it can’t find one
      of its own classes. This commit changes the order so that the TomEE
      tests run before the Tomcat tests.
      
      \_(ツ)_/¯
      f54b5d7a
    • Andy Wilkinson's avatar
      Update logging listener to use normal stack trace ordering by default · 8ed472d6
      Andy Wilkinson authored
      Previously, LoggingApplicationListener used %rEx as the default
      exception conversion word. This would result in the nested causes
      being logging in reverse order, i.e. the most deeply nested cause
      would be logged first.
      
      This commit updates the default to be %wEx and adds a test to verify
      the default behaviour.
      
      Closes gh-4247
      8ed472d6