1. 20 Jan, 2016 6 commits
    • Andy Wilkinson's avatar
      5e5542f0
    • Andy Wilkinson's avatar
      Perform background preinitialization after logging system setup · b85b6082
      Andy Wilkinson authored
      Previously, BackgroundPreinitializer would kick off preinitialization
      on a separate thread in response to an ApplicationStartedEvent. This
      work would then race with the logging system being set up in response
      to an ApplicationEnvironmentPreparedEvent. When Logback’s being used
      this race is problematic. As part of Logback’s setup,
      LoggerContext.stop() is called. This calls LoggerContext.reset() which
      can fail with a ConcurrentModificationException if another thread tries
      to create a Logger at the same time. This is a known bug in Logback [1].
      
      This commit updates BackgroundPreinitializer to respond to
      an ApplicationEnvironmentPreparedEvent and to order itself so that it’s
      called after LoggingApplicationListener has responded to the same event
      by initializing the logging system.
      
      Closes gh-4871
      
      [1] http://jira.qos.ch/browse/LOGBACK-397
      b85b6082
    • Andy Wilkinson's avatar
      Don’t check that a Gauge’s value is a Number until it’s being read · 00f45385
      Andy Wilkinson authored
      Spring Boot’s metrics require all values to be Numbers. A Dropwizard
      Gauge can have a non-Number value. Previously, to prevent this causing
      a problem, MetricRegistryMetricReader would check the value of a Gauge
      when it’s being added and ignore it if it had a non-Number value.
      Unfortunately, retrieving the value of a Gauge can take a non-trivial
      amount of time (hence CachedGauge) so this approach, while functional,
      could be improved.
      
      This commit updates the filtering to happen when a Metric is being
      retrieved from MetricRegistryMetricReader (via findOne or findAll)
      when its value is required anyway. At this point, any Gauge with a
      non-Number value is ignored.
      
      Closes gh-4874
      00f45385
    • Andy Wilkinson's avatar
      Merge branch 'gh-4976' · d7fbe9ef
      Andy Wilkinson authored
      d7fbe9ef
    • Andy Wilkinson's avatar
      Polish contribution · 2f24c186
      Andy Wilkinson authored
      2f24c186
    • mkwaczynski's avatar
      Include details in AuditEvent data in AuthenticationAuditListener · 3724db9e
      mkwaczynski authored
      Closes gh-4976
      3724db9e
  2. 19 Jan, 2016 5 commits
    • Andy Wilkinson's avatar
      Merge branch '1.2.x' · 1dd16669
      Andy Wilkinson authored
      1dd16669
    • Andy Wilkinson's avatar
      Make EmbeddedVelocityToolboxView work in servlet container deployments · 5ef69036
      Andy Wilkinson authored
      EmbeddedVelocityToolboxView is used with both embedded containers and
      when a Spring Boot application is deployed to a servlet container. It
      process the ServletContext to intercept calls to getResource so that it
      can load Velocity’s toolbox.xml file from within an executable jar.
      Previously, when it created the proxy, it didn’t specify the ClassLoader
      to use. This resulted in the proxy being created using the ClassLoader
      that loaded the Class that is being proxied. This fails when the
      application is deployed to a ServletContainer as the ClassLoader that
      loaded the ServletContext implementation is the container’s ClassLoader
      and it cannot see the classes that are specific to the web application.
      
      This commit updates EmbeddedVelocityToolboxView to specify the
      ClassLoader to use when creating the proxy. It specifies its own
      ClassLoader thereby ensuring that the proxy creation can load
      application-specific classes.
      
      Fixes gh-4967
      5ef69036
    • Stephane Nicoll's avatar
      Fix log message · 46470934
      Stephane Nicoll authored
      Closes gh-4969
      46470934
    • Stephane Nicoll's avatar
      Merge branch '1.2.x' · c57588ac
      Stephane Nicoll authored
      c57588ac
    • Stephane Nicoll's avatar
      Fix documentation of logging.path and logging.file · 2ceadd70
      Stephane Nicoll authored
      See gh-4969
      2ceadd70
  3. 18 Jan, 2016 11 commits
    • Andy Wilkinson's avatar
      Ensure that MongoClient is not created with a null credentials list · 112b707b
      Andy Wilkinson authored
      Mongo’s 2.x driver allowed the credentials list to be null, however
      the 3.x driver requires an empty list instead. The behaviour of the 2.x
      driver is the same whether the client is created with a null credential
      list or an empty credential list.
      
      This commit aligns with the requirements of the 3.x driver by ensuring
      that we never pass in a null credential list when creating the client.
      
      Closes gh-4076
      112b707b
    • Andy Wilkinson's avatar
      Merge branch 'gh-4895' · 6dadac1d
      Andy Wilkinson authored
      6dadac1d
    • Andy Wilkinson's avatar
      Polish contribution · 77e350ac
      Andy Wilkinson authored
      77e350ac
    • Vladimir Tsanev's avatar
      Allow DevTools to find and configure Spring Session 1.1's RedisTemplate · 3e291ff0
      Vladimir Tsanev authored
      Previously, when Spring Session 1.1.0.M1 and DevTools were declared as
      dependencies the application failed to start, because
      sessionRedisTemplate could not be resolved.
      
      This commit relaxes the dependency for sessionRedisTemplate in
      restartCompatibleRedisSerializerConfigurer from
      RedisTemplate<String, ExpiringSession> to RedisTemplate<?, ?> and uses
      the bean name in a @Qualifer to ensure that the right RedisTemplate
      bean gets injected.
      
      Fixes gh-4895
      Closes gh-4896
      3e291ff0
    • Andy Wilkinson's avatar
      Merge branch '1.2.x' · da450411
      Andy Wilkinson authored
      da450411
    • Andy Wilkinson's avatar
      Reinstate Tomcat’s old default behaviour for context root redirects · 43ed824f
      Andy Wilkinson authored
      Prior to Tomcat 8.0.30, its default behaviour was for the mapper to
      redirect a request for context-root to context-root/. This redirection
      was switched off by default in 8.0.30 by default. This has proven
      to be problematic and Tomcat 8.0.31 will reinstate the old default.
      
      While we are waiting for Tomcat 8.0.31 to be released, this commit
      explicitly sets the default back to what it was in 8.0.29 and earlier
      and what it will be in 8.0.31.
      
      Closes gh-4937
      43ed824f
    • Andy Wilkinson's avatar
      Remove HalJsonMvcEndpoint’s redirect and add links to both paths instead · 69b60f6d
      Andy Wilkinson authored
      Previously, HalJsonMvcEndpoint used a redirect to go from path/ to path.
      When the actuator’s configured to use a custom context path this
      redirect was leading to an infinite redirect loop.
      
      This commit removes the redirect in favour of updating the controller
      advice to apply the links to requests for path and path/.
      
      Closes gh-4853
      69b60f6d
    • Andy Wilkinson's avatar
      Fix MavenSettings’ handling of profiles activated by a file · c4f756da
      Andy Wilkinson authored
      Previously, MavenSettings used a FileProfileActivator with no
      PathTransformer. If a settings.xml file contains a file-activated
      profile this would result in an NPE within Maven. This was made worse
      by the NPE not being included in the resulting failure message which
      hampered diagnosis of the problem.
      
      This commit updates MavenSettings to configure its FileProfileActivator
      with a PathTransformer. It also improves the failure message that’s
      created from any problems that are reported by Maven while determining
      the active profiles to include a problem’s exception if it has one.
      
      Closes gh-4826
      c4f756da
    • Stephane Nicoll's avatar
      Polish · 7d975ecd
      Stephane Nicoll authored
      7d975ecd
    • Stephane Nicoll's avatar
      Enable resource chain if webjars locator is present · af5d765a
      Stephane Nicoll authored
      Webjars locator is a good hint that the resource chain should be
      enabled. The sole presence of the library now enables the resource chain
      unless the configuration states otherwise.
      
      Closes gh-4403
      af5d765a
    • Stephane Nicoll's avatar
      Add property to skip integration tests · 7842f50e
      Stephane Nicoll authored
      Generalize the `skip` property to start and stop goals so that one
      can control if the Spring Boot app is starting via a configuration
      property.
      
      Note that this only controls the Spring Boot Maven plugin and the
      failsafe maven plugin should be updated accordingly.
      
      Closes gh-4922
      7842f50e
  4. 17 Jan, 2016 3 commits
  5. 15 Jan, 2016 13 commits
  6. 14 Jan, 2016 2 commits
    • Andy Wilkinson's avatar
      Merge branch '1.2.x' · 89beef40
      Andy Wilkinson authored
      89beef40
    • Andy Wilkinson's avatar
      Exclude Java agents from class loader created by PropertiesLauncher · 681a866c
      Andy Wilkinson authored
      PropertiesLauncher creates a ClassLoader that is used by the Launcher
      to load an application’s classes. During the creation of this
      ClassLoader URLs from its ClassLoader. This resulted resulting in Java
      agents that are added to the system class loader via the -javaagent
      launch option being available on both the system class loader and the
      created class loader. Java agents are intended to always be loaded by
      the system class loader. Making them available on another class loader
      breaks this model.
      
      This is the same problem that was in ExecutableArchiveLauncher and
      that was fixed in ee08667e (see gh-863).
      
      This commit updates PropertiesLauncher so that it skips the URLs of
      any Java agents (found by examining the JVM’s input arguments) when
      copying URLs over to the new ClassLoader, thereby ensuring that Java
      agents are only ever loaded by the system class loader.
      
      Closes gh-4911
      681a866c