1. 16 Dec, 2015 2 commits
  2. 14 Dec, 2015 2 commits
    • Phillip Webb's avatar
      Protect against SpEL injections · edb16a13
      Phillip Webb authored
      Prevent potential SpEL injection attacks by ensuring that whitelabel
      error view SpEL placeholders are not recursively resolved.
      
      Fixes gh-4763
      edb16a13
    • Andy Wilkinson's avatar
      Stop ActiveMQ pooled connection factory when context is closed · 7d5cc3da
      Andy Wilkinson authored
      Previously, ActiveMQ's pooled connection factory was not closed as
      part of the application context being closed. This would leave
      non-daemon threads running which could cause shutdown to hang unless
      the JVM itself was shutting down (in which case a shutdown hook would
      stop the pool).
      
      This commit configures each pooled connection factory bean with a
      custom destroy method so that the pool is stopped as part of the
      application context being closed. To allow the destroy method to only
      be declared when the connection factory is pooled, the bean method
      has been split into two; one for pooled and one for non-pooled. This
      is a partial backport of the changes made in bedf2edf.
      
      Closes gh-4748
      7d5cc3da
  3. 11 Dec, 2015 1 commit
  4. 10 Dec, 2015 5 commits
    • Phillip Webb's avatar
      Polish · 2694605a
      Phillip Webb authored
      2694605a
    • Stephane Nicoll's avatar
      Reintroduce endpoints.metrics.filter.enabled · ce2346b0
      Stephane Nicoll authored
      Commit 8c140092 removed the endpoints.metrics.filter.enabled property so
      that endpoints.metrics.enabled is used for both disabling the endpoint
      and the servlet filter that records interactions.
      
      This was an unfortunate decision as it was no longer possible to only
      disable the servlet filter. The endpoints.metrics.filter.enabled property
      has therefore been restored.
      
      Closes gh-4365
      ce2346b0
    • Andy Wilkinson's avatar
      Align BasicErrorController’s HTML response status with non-HTML status · ce541beb
      Andy Wilkinson authored
      Previously, BasicErrorController would return the response status
      set in the javax.servlet.error.status_code request attribute when
      serving JSON but would also return a 200 OK response when serving
      HTML. This didn’t cause much trouble when a person was browsing, but
      proved problematic for machine clients that request text/html and care
      about the response status. For example, the success handler would be
      driven for an XHR request even though the response was really an error.
      
      This commit updates BasicErrorController to set the response status for
      text/html responses to match the status that it would use in an
      application/json response.
      
      Closes gh-4694
      ce541beb
    • Andy Wilkinson's avatar
      Cache outcome of checking to see if host supports ANSI output · b36fe2cb
      Andy Wilkinson authored
      Closes gh-4510
      b36fe2cb
    • Andy Wilkinson's avatar
      Revert "Upgrade to Spring Integration 4.1.7.RELEASE" · 8dc3b71c
      Andy Wilkinson authored
      This reverts commit bb9e1be7.
      
      4.1.7.RELEASE is incompatible with Spring IO Platform 1.1.x due to a
      new dependency on kryo-shaded. kryo-shaded was introduced in Kryo
      3.0.x but IO Platform 1.1.x uses Kryo 2.
      
      See gh-4719
      8dc3b71c
  5. 09 Dec, 2015 10 commits
  6. 03 Dec, 2015 3 commits
    • Andy Wilkinson's avatar
      Only clean up logging system when root application context is closed · 00b668b2
      Andy Wilkinson authored
      Previously, LoggingApplicationListener would clean up the logging
      system in response to any application context with which it was
      registered being closed. This caused problems when a child context was
      closed. Specifically, closing the child context would cause any
      SLF4J-based logging systems to unregister the JUL bridge handler
      preventing an JUL logging being bridged into Logback or Log4J2.
      
      This commit updates LoggingApplicationListener so that the logging
      system is only cleaned up when a root application context is
      closed.
      
      Closes gh-4651
      00b668b2
    • Ivan Chen's avatar
      Remove unused test.css from spring-boot-sample-tomcat · d6bd120b
      Ivan Chen authored
      Closes gh-4606
      d6bd120b
    • Vladimir Tsanev's avatar
      Use fast exceptions in findResource(s) · 939b66f4
      Vladimir Tsanev authored
      Some libraries like aspectj are using findResource to see the raw
      bytecode of a class. It will even call findResource for every method of
      every class of beans that are post processed. This can be significant
      performance hit on startup when LaunchedURLClassLoader and there are a
      lot of nested jars.
      
      See gh-3640
      Fixes gh-4557
      939b66f4
  7. 01 Dec, 2015 1 commit
    • Andy Wilkinson's avatar
      Remove inconsistent synchronization from EmbeddedWebApplicationContext · 0214fe4b
      Andy Wilkinson authored
      Previously, EmbeddedWebApplicationContext used synchronized, but did
      not do so consistently. It also synchronized on this so its lock was
      exposed outside of the class, creating a risk of deadlock if a caller
      synchronized incorrectly. Furthermore, not all fields on the class
      were sychronized so the class wasn't truly thread-safe.
      
      This commit attempts to rectify some of the problems above. The use
      of synchronized has been dropped in favour of using a volatile field
      for the embedded servlet container. Whenever this field is accessed,
      a local variable is used to "cache" the value thereby preventing a
      change on another thread from causing unwanted behaviour such as an
      NPE.
      
      Closes gh-4593
      0214fe4b
  8. 29 Nov, 2015 1 commit
  9. 27 Nov, 2015 2 commits
  10. 26 Nov, 2015 2 commits
  11. 25 Nov, 2015 1 commit
  12. 23 Nov, 2015 2 commits
  13. 17 Nov, 2015 1 commit
    • Andy Wilkinson's avatar
      Isolate multiple Undertow deployments · 2fe08194
      Andy Wilkinson authored
      Previously, UndertowEmbeddedServletContainerFactory always used
      Undertow’s default ServletContainer. This meant that if there were two
      UndertowEmbeddedServletContainers created, they would share the same
      ServletContainer and the second one that was created would overwrite
      the deployment for the first. This resulted in a async request
      handling failing as the attempt to look up the deployment for the
      first embedded Undertow instance would incorrectly find the deployment
      for the second.
      
      This commit fixes the problem by ensuring that each 
      UndertowEmbeddedServletContainerFactory uses a separate Undertow
      ServletContainer instance.
      
      Closes gh-4329
      2fe08194
  14. 14 Nov, 2015 1 commit
  15. 13 Nov, 2015 1 commit
  16. 09 Nov, 2015 1 commit
    • Phillip Webb's avatar
      Fully support `-cp` arguments · 49a55875
      Phillip Webb authored
      The CLI application advertises `-cp` support but it appears that only
      `--cp` is really supported. The fix for gh-178 forgot to update the
      call to `getParser().parse(...)`.
      
      See gh-178
      49a55875
  17. 06 Nov, 2015 2 commits
    • Phillip Webb's avatar
      Restore original embedded container shutdown order · f08f8727
      Phillip Webb authored
      Update EmbeddedWebApplicationContext so that the servlet container is
      shutdown after the context is closed. Unfortunately shutting the
      container down before the context has been closed causes exceptions if
      the `/shutdown` actuator endpoint is used. It can also cause the Tomcat
      classloader to throw IllegalStateExceptions if resources are accessed
      during shutdown.
      
      As this commit effectively reverts 0069e41c we need to fix the shutdown
      deadlock issue reported in gh-4130 in a different way. The deadlock can
      be caused when an incoming HTTP connection occurs whilst the context is
      closing. The incoming connection triggers the `FrameworkServlet` to
      call `initWebApplicationContext` which in turn calls `refresh`. The
      `FrameworkServlet` checks `ApplicationContext.isActive()` before
      performing an initialization but prior to this commit we would set
      active to `false` before stopping the servlet container. We now override
      `onClose` rather than `doClose` in `EmbeddedWebApplicationContext` to
      ensure that the active flag is only set to `false` once the servlet
      container has been stopped.
      
      See gh-4130
      Fixes gh-4396
      f08f8727
    • Stephane Nicoll's avatar
      Fix Maven/Gradle wrapper executable flag · 6d90188a
      Stephane Nicoll authored
      Spring Initalizr now bundles a wrapper script for the build system. While
      that wrapper has the necessary execute flag in the zip archive, that flag
      is lost as the zip abstraction does not honor those.
      
      The init command now makes sure to restore the execute flag on `mvnw`
      and `gradlew` if necessary.
      
      Unfortunately, this can't be tested as the Windows build would fail to
      assert that the executable flag has been propertly set.
      
      Closes gh-4392
      6d90188a
  18. 05 Nov, 2015 2 commits