1. 15 Oct, 2015 3 commits
  2. 14 Oct, 2015 4 commits
  3. 12 Oct, 2015 9 commits
  4. 09 Oct, 2015 7 commits
    • Phillip Webb's avatar
      Fix broken formatting · 70214da2
      Phillip Webb authored
      70214da2
    • Phillip Webb's avatar
      94736719
    • Phillip Webb's avatar
      Add custom Eclipse code formatter · b779e8e4
      Phillip Webb authored
      Update Eclipse settings to make use of a custom Spring formatter
      implementation. Using a custom formatter allows us to fix a couple of
      issues with the version that shipped with Eclipse Mars.1 (Eclipse bugs
      
      The custom formatter also means that it is possible to use Groovy
      Eclipse despite the fact that it has formatter regressions (see
      https://github.com/groovy/groovy-eclipse/issues/142).
      
      Fixes gh-4136
      b779e8e4
    • Andy Wilkinson's avatar
      Update tests to expect additional entry in test jar · 04c2bd9c
      Andy Wilkinson authored
      Closes gh-4124
      04c2bd9c
    • Andy Wilkinson's avatar
      Ensure that JarFileArchive unpacks entries to unique location · 888fa902
      Andy Wilkinson authored
      Previously, JarFileArchive would always unpack any entries marked for
      unpacking to ${java.io.tmpdir}/spring-boot-libs. This could cause
      problems if multiple Spring Boot applications were running on the same
      host:
      
      - If the apps are run as different users the first application would
        create the spring-boot-libs directory and the second and subsequent
        applications may not have write permissions to that directory
      - Multiple apps may overwrite each others unpacked libs. At best this
        will mean one copy of a jar is overwritten with another identical
        copy. At worst the jars may have different contents so that some of
        the contents of the original jar disappear unexpectedly.
      
      This commit updates JarFileArchive to use an application-specific
      location when unpacking libs. A directory beneath ${java.io.tmpdir} is
      still used but it's now named <jar-file-name>-spring-boot-libs-<uuid>.
      A loop, limited to 1000 attempts, is used to avoid problems caused by
      the uuid clashing.
      
      Closes gh-4124
      888fa902
    • Andy Wilkinson's avatar
      Use Java 8 on Travis as the samples now require it · f7d2bafb
      Andy Wilkinson authored
      Commit 09395f95 updated the samples to require Java 8. This commit
      updates the Travis configuration to build with Java 8.
      
      Closes gh-4133
      f7d2bafb
    • Andy Wilkinson's avatar
      Prevent closed context from being refreshed again by an HTTP request · 0069e41c
      Andy Wilkinson authored
      Prior to this commit, EmbeddedWebApplicationContext would perform its
      close processing and then stop the embedded container. This could
      lead to the closed context's dispatcher servlet handling an HTTP
      request and refreshing the context again. This opened up two
      possibilities that we need to avoid:
      
      1. Another HTTP request could be received by the dispatcher servlet
         while the context is still being refreshed. This could lead to the
         context being used before its refreshed. I believe this could be
         the cause of the current modification exception described in
         gh-3239 and SPR-13123.
      2. It can lead to a race during shutdown as the shutdown hook's
         attempt to close the context races with the refresh initiated by
         the HTTP request. This is possible as the shutdown hook bypasses
         the sychronization on startupShutdownMonitor that would normally
         prevent refresh and close from occurring in parallel. This race
         can lead to a deadlock as described in gh-4130
      
      Closes gh-4130
      0069e41c
  5. 08 Oct, 2015 5 commits
  6. 07 Oct, 2015 2 commits
  7. 06 Oct, 2015 3 commits
    • Andy Wilkinson's avatar
      Work around intermittent failure caused by SPR-13079 · d793d5ab
      Andy Wilkinson authored
      See gh-4098
      d793d5ab
    • Andy Wilkinson's avatar
      6387f36e
    • Andy Wilkinson's avatar
      Improve MetricsFilter’s handling of async requests · b8b4ea48
      Andy Wilkinson authored
      Previously, MetricsFilter would treat async requests the same as
      sync requests and would record their response status as soon as the
      request had been processed by the filter chain. This would result in a
      200 response being recorded and the actual response status produced by
      the async processing being ignored. Furthermore, the time that was
      recorded for the request would not include the time take for any async processing.
      
      This commit updates MetricsFilter to check whether or not an async
      request has been started before it records the metrics for the request.
      In the event of an async request having been started no metrics are
      recorded. Instead, the StopWatch is stored in a request attribute that
      is then retrieved during the filtering of the request’s async
      dispatch(es). Once the async processing has completed (isAsyncStarted()
      returns false), the StopWatch is stopped, removed from the request’s
      attributes and the metrics for the request are recorded.
      
      Closes gh-4098
      b8b4ea48
  8. 05 Oct, 2015 1 commit
  9. 02 Oct, 2015 4 commits
  10. 29 Sep, 2015 1 commit
    • Phillip Webb's avatar
      Support `.` and `_` binder prefix joins · b0d9a832
      Phillip Webb authored
      Update RelaxedDataBinder so that both `.` and `_` are considered in
      getPropertyValuesForNamePrefix(...).
      
      With Spring Boot 1.2.5 binding environment variables of the form
      `FOO_BAR_BAZ` to `@ConfigurationProperties(prefix="foo-bar")` objects
      worked thanks to a happy accident. When `PropertySourcesPropertyValues`
      processed a non enumerable `PropertySource` it called the resolver
      with a property name `FOO_BAR.BAZ`. A `SystemEnvironmentPropertySource`
      will replace `.` with `_` and hence find a value.
      
      Commit 1abd0879 updated non enumerable processing such that the resolver
      was never called.
      
      Replicating the problem is quite involved as you need to ensure that you
      have both a SystemEnvironmentPropertySource and a non-enumerable
      property source (e.g. RandomPropertySource). A test has been added to
      PropertiesConfigurationFactoryTests which passes on 1.2.5, fails on
      1.2.6 and passes again following this commit.
      
      Fixes gh-4045
      b0d9a832
  11. 22 Sep, 2015 1 commit