1. 23 Nov, 2015 1 commit
  2. 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
  3. 14 Nov, 2015 1 commit
  4. 13 Nov, 2015 1 commit
  5. 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
  6. 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
  7. 05 Nov, 2015 3 commits
  8. 03 Nov, 2015 2 commits
    • Phillip Webb's avatar
      Polish · 2118242e
      Phillip Webb authored
      2118242e
    • Stephane Nicoll's avatar
      Fix key to disable the metrics filter · 8c140092
      Stephane Nicoll authored
      Commit d0cf6b53 introduced a `endpoints.metrics.filter.enabled` property
      key meant to disable the filter. Unfortunately, the `endpoints.metrics`
      namespace is already managed so setting this property will fail.
      
      We now use the same key than the one used to disable the metrics
      endpoint.
      
      Closes gh-4365
      8c140092
  9. 01 Nov, 2015 1 commit
  10. 30 Oct, 2015 2 commits
    • Andy Wilkinson's avatar
      Ensure that HATEOAS sample does not try to produce XML · 1f923605
      Andy Wilkinson authored
      The HATEOAS sample does not support XML responses. Previously, the
      controller doesn't constrain the media types that it could produce.
      This would result in a failure when handling a request that prefers
      XML responses.
      
      This commit updates the produces clauses in the controller so that
      the sample will only attempt to produce JSON.
      
      Closes gh-4343
      1f923605
    • Andy Wilkinson's avatar
      Update Tomcat multi-connectors sample to configure SSL declaratively · 05b501ce
      Andy Wilkinson authored
      The documentation recommends configuring the HTTP connector in code
      and using application.properties to configure the HTTPS connector
      as it's easier. This commit updates the sample to follow that
      recommendation.
      
      Closes gh-4342
      05b501ce
  11. 22 Oct, 2015 2 commits
    • Stephane Nicoll's avatar
      Filter duplicate · 7c1bf582
      Stephane Nicoll authored
      Improve the initial PR to include a filtering of the profiles that were
      already enabled via the `spring.profiles.active` property.
      
      Also add more tests to prove that each profile is loaded only once
      now.
      
      Closes gh-4273
      7c1bf582
    • Dave Syer's avatar
      Fix logic affecting files loaded · 06bb6bd1
      Dave Syer authored
      The problem fixed here is that the Loader keeps track of the profiles it
      is going to look at for loading files, but ignores any that were already
      active in the Environment if the listener is called initially with
      spring.profiles.active not empty.
      
      Closes gh-4261
      06bb6bd1
  12. 21 Oct, 2015 1 commit
    • Stephane Nicoll's avatar
      Allow PORTFILE to always override the file to use · 2e2ebeb9
      Stephane Nicoll authored
      Previously, the `PORTFILE` system property was not checked if the
      `EmbeddedServerPortFileWriter` was created using the default constructor.
      
      This had the effect to prevent overriding of the port file when this
      listener is created without any file or via `META-INF/spring.factories`.
      
      Closes gh-4254
      2e2ebeb9
  13. 20 Oct, 2015 2 commits
  14. 19 Oct, 2015 5 commits
  15. 16 Oct, 2015 7 commits
    • Spring Buildmaster's avatar
      Next Development Version · 2b38a861
      Spring Buildmaster authored
      2b38a861
    • Andy Wilkinson's avatar
      Ignore parent contexts in message source auto-configuration · c236db04
      Andy Wilkinson authored
      This commit applies the changes made in 68b55ada to 1.2.x (it was
      originally only made in 1.0.x and master). It also adds some tests.
      
      Closes gh-3803
      c236db04
    • Andy Wilkinson's avatar
      Reinstate the use of shutdown hooks in the tests · 35a3f4a1
      Andy Wilkinson authored
      Commit adf2c44b was an attempt to prevent HSQLDB from throwing an
      exception when the JVM exits. This was achieved by disabling the
      application context’s shutdown hook in the tests. This had the unwanted
      side effect of causing tests’ application contexts not to be closed. The
      reported symptom was that @Destroy methods were no longer being invoked.
      We need a different solution to the problem.
      
      The exception was:
      
      Caused by: org.hsqldb.HsqlException: Database lock acquisition failure: attempt to connect while db opening /closing
          at org.hsqldb.error.Error.error(Unknown Source)
          at org.hsqldb.error.Error.error(Unknown Source)
          at org.hsqldb.error.Error.error(Unknown Source)
          at org.hsqldb.DatabaseManager.getDatabase(Unknown Source)
          at org.hsqldb.DatabaseManager.newSession(Unknown Source)
          ... 23 common frames omitted
      
      I originally thought this was due to a race between the application
      context’s shutdown hook and HSQLDB’s shutdown hook, however HSQLDB
      doesn’t use a shutdown hook. I believe that the problem is due to 
      an HSQLDB database being created with shutdown=true in its URL, similar
      to the problem described here [1]. This will shut down the database when
      the last connection to it is closed, however the shutdown will happen
      asynchronously. If the JVM then runs the application context’s shutdown
      hook, EmbeddedDatabaseFactory will attempt to connect to the database to
      execute the SHUTDOWN command. This executes synchronously but will race
      with the asynchronous shutdown that’s executing as a result of
      shutdown=true in the JDBC url and the last connection to the database
      being closed. 
      
      This commit reinstates the use of application context shutdown hooks in
      the tests, and updates the documentation to recommend that, if a user
      manually configures the URL for their embedded database, they do so 
      in such a way that the database doesn’t shutdown automatically, thereby
      allowing the shutdown to be driven by application context close.
      
      Closes gh-4208
      
      [1] http://sourceforge.net/p/hsqldb/bugs/1400/
      35a3f4a1
    • Phillip Webb's avatar
      Roll back to Groovy 2.4.4 · 1c46fd2a
      Phillip Webb authored
      See gh-4210
      1c46fd2a
    • Phillip Webb's avatar
      Revert "Increase PermGen for CLI integration tests" · b0d28735
      Phillip Webb authored
      This reverts commit 4c26b0c1.
      b0d28735
    • Phillip Webb's avatar
      Revert "Compile samples and integration tests with Java 8" · d84889b0
      Phillip Webb authored
      This reverts commit 09395f95.
      d84889b0
    • Phillip Webb's avatar
      Increase PermGen for CLI integration tests · 4c26b0c1
      Phillip Webb authored
      4c26b0c1
  16. 15 Oct, 2015 4 commits
  17. 14 Oct, 2015 4 commits