Commit Graph

7054 Commits (7a5fabf59d838c3e70cc24b38ddc41db773504ce)
 

Author SHA1 Message Date
Andy Wilkinson a19eeaf91d DevTools should only shut down single, auto-configured DataSource
Previously, there were two problems with DevTools’ DataSource
auto-configuration:

1. It did not tolerate a context with multiple DataSources
2. It would attempt to shut down a DataSource that had not been created
   by DataSourceAutoConfiguration and, therefore, where we could not be
   sure of its configuration.

This commit updates DevToolsDataSourceAutoConfiguration so that it backs
off unless the context contains DataSourceProperties and a single
DataSource created by DataSourceAutoConfiguration. This ensures that it
can safely use DataSourceProperties to get the DataSource’s
driver class name and accurately determine if it’s an in-memory or
external database. Shutdown is only called for an in-memory database.

Closes gh-5540
9 years ago
Andy Wilkinson 432969e61e Correct documented spring.factories key for management context config
Closes gh-5664
9 years ago
Andy Wilkinson a4d7a77547 Apply spring.thymeleaf.cache to auto-configured ThymeleafViewResolver
Previously, spring.thymeleaf.cache was only applied to auto-configured
TemplateResolver. This commit also applies the propery to the
auto-configured ThymeleafViewResolver.

Closes gh-5395
9 years ago
Andy Wilkinson 9210029109 Record trace with response status of 500 following unhandled exception
Previously, if the filter chain threw an unhandled exception,
WebRequestTraceFilter would record a trace with a response status of
200. This occurred because response.getStatus() would return 200 as
the container had not yet caught the exception and mapped it to an
error response.

This commit updates WebRequestTraceFilter to align its behaviour with
MetricsFilter. It now assumes that the response status will be a 500
and only updates that to the status of the response if the call to the
filter chain returns successfully.

To avoid making a breaking change to the signature of the protected
enhanceTrace method, an HttpServletResponseWrapper is used to include
the correct status in the trace.

Closes gh-5331
9 years ago
Andy Wilkinson 2e54078083 Tolerate possible null Flyway MigrationVersion when using Flyway 4.0
Flyway 4.0 provides support for repeatable migrations that do not
have a version. When such a migration has been performed,
MigrationInfo.getMigrationVersion() will return null and, previously,
FlywayEndpoint would fail with an NPE.

This commit updates FlywayEndpoint to use null as the version when
MigrationInfo.getMigrationVersion() returns null.

Closes gh-5700
9 years ago
Andy Wilkinson b554894bb4 Polishing 9 years ago
Andy Wilkinson 1fbd43bdf0 Tolerate jar files with no manifest in ChangeableUrls
Closes gh-5704
9 years ago
Phillip Webb a2f482b7f3 Merge pull request #5053 from spauk/master
* pull5053:
  Make UserInfoTokenServices.getPrincipal protected
9 years ago
Sergey Pauk 8542f4f481 Make UserInfoTokenServices.getPrincipal protected
Update UserInfoTokenServices.getPrincipal() so that it can be overridden
by subclasses to allow a custom authenticated principal to be returned
from the authorized request parameters.

Fixes gh-5053
9 years ago
Phillip Webb b1656be3d0 Fix possible binder IndexOutOfBoundsException
Update RelaxedDataBinder.extendCollectionIfNecessary to use the current
index when checking if the path node is an array.

Fixes gh-5635
9 years ago
Andy Wilkinson 1412eaa0e0 Handle relative URLs in jar's Class-Path when getting changeable URLs
5e0ba6ea added support for reading a jar manifest's Class-Path
attribute when resolving changeable URLs from a URLClassLoader,
however it did not handle relative URLs, i.e. URLs without a protocol,
correctly.

This commit updates ChangeableUrls so that it uses the URL of the
JAR that contains the manifest as the base for any new URLs that
are created. When the Class-Path entry is relative, this base will
be used. When the Class-Path entry is absolutee, URL's constructor
will ignore the supplied base.

Closes gh-5665
9 years ago
Phillip Webb af2483816b Fix JarFileTests to work on Windows
See gh-5287
9 years ago
Phillip Webb a1284bce61 Configure ChildManagementContext container type
Ensure any ChildManagementContext created to start a management server
on a different port uses the same EmbeddedServletContainerFactory type.

Fixes gh-5474
9 years ago
Phillip Webb d7e56abdf3 Don't apply `null` ServerProperties from customize
Update ServerProperties so that `null` values are not applied when
customizing the EmbeddedServletContainerFactory. Primarily changed to
stop `server.undertow.accesslog.enabled` from being blindly applied.

Fixes gh-5515
9 years ago
Phillip Webb 3ca365cff0 Export MessageChannel metric writer
Update the auto-configured MessageChannelMetricWriter with
@ExportMetricWriter so that metrics are actually exported.

Fixes gh-5517
9 years ago
Phillip Webb 02764b8ff3 Support Jetty error page handling of PUT requests
Update JettyEmbeddedServletContainerFactory so that requests other than
just GET, POST and HEAD are handled by the ErrorHandler.

Fixes gh-5367
9 years ago
Phillip Webb 084b288947 Polish 9 years ago
Andy Wilkinson 5e0ba6ea2e Consider jar's Class-Path attribute when getting changeable URLs
To overcome command length limits on Windows, IntelliJ IDEA may launch
an application with a single jar on the classpath that contains that
application's actual classpath in the Class-Path attribute of its
manifest. This would prevent DevTools restarts from working as it
only considered the single jar's URL when identifying changeable URLs
and ignored the URLs added to the classpath via the jar's manifest.

This commit updates ChangeableUrls when it is created from a
URLClassLoader to consider the Class-Path manifest attribute of any
jars in the class loader's URLs. This allows the full classpath to
be considered when identifying URLs that are changeable and that
need to be monitored for restart triggering.

Closes gh-5127
9 years ago
Andy Wilkinson 7f3d4adfef Merge pull request #5289 from Vladimir Tsanev
* gh-5289:
  Polish contribution
  Update JarURLConnection to support jar:file://… URLs
9 years ago
Andy Wilkinson 74e27db486 Polish contribution 9 years ago
Vladimir Tsanev a0f76eab47 Update JarURLConnection to support jar:file://… URLs
Previously, JarURLConnection would fail when created with a URL that
began with jar:file:// as the double-slash is not included in jarFile.getUrl().getFile().

This commit updates JarURLConnection to normalise the value return from
url.getFile() to remove a double-slash when present.

Fixes gh-5287
Closes gh-5289
9 years ago
Andy Wilkinson d6ad4dcc11 Merge pull request #5397 from Vedran Pavic
* gh-5397:
  Improve repeatability of launch script tests
9 years ago
Vedran Pavic 9e287ef611 Improve repeatability of launch script tests
Previously, tags were used for CentOS and Ubuntu images that may
change over time. This commit updates the Dockerfiles to use fixed
base images. For Ubuntu, a fixed tag is available. For CentOS we
have to resort to using the digest.

Closes gh-5397
9 years ago
Andy Wilkinson 30626b52aa Merge pull request #5394 from Christian Brunotte
* gh-5394:
  Update launch.script so popd does not print directory name to stdout
9 years ago
Christian Brunotte 677080b8e2 Update launch.script so popd does not print directory name to stdout
Closes gh-5394
9 years ago
Andy Wilkinson 0f6b76cf7b Merge pull request #5615 from Johnny Lim
* gh-5615:
  Remove a duplicate test
9 years ago
Johnny Lim ec83d97443 Remove a duplicate test
Closes gh-5615
9 years ago
Andy Wilkinson d138c1a61f Upgrade to Spring Security 4.0.4.RELEASE
Closes gh-5588
9 years ago
Andy Wilkinson 17aadc72ec Upgrade to Spring Security JWT 1.0.4.RELEASE
Closes gh-5587
9 years ago
Andy Wilkinson 52e876a996 Upgrade to Spring Cloud Connectors 1.2.2.RELEASE
Closes gh-5586
9 years ago
Andy Wilkinson ada3155a80 Upgrade to SLF4J 1.7.21
Closes gh-5585
9 years ago
Andy Wilkinson c77659c216 Upgrade to jOOQ 3.7.3
Closes gh-5584
9 years ago
Andy Wilkinson a0420f5f7c Upgrade to Jaybird 2.2.10
Closes gh-5583
9 years ago
Andy Wilkinson 41c1b29067 Upgrade to AspectJ 1.8.9
Closes gh-5582
9 years ago
Andy Wilkinson 1d8ff34eb0 Upgrade to Tomcat 8.0.33
Closes gh-5581
9 years ago
Andy Wilkinson f3b70e4641 Upgrade to HTTP Client 4.5.2
Closes gh-5580
9 years ago
Andy Wilkinson 36c572918e Upgrade to Undertow 1.3.20.Final
Closes gh-5579
9 years ago
Andy Wilkinson 20ba452eb2 Upgrade to HikariCP 2.4.5
Closes gh-5578
9 years ago
Andy Wilkinson 810ce0ed5a Upgrade to Jackson 2.6.6
Closes gh-5577
9 years ago
Andy Wilkinson ffe21175ca Upgrade to Logback 1.1.7
Closes gh-5568
9 years ago
Andy Wilkinson dad4e84d35 Merge pull request #5410 from Kazuki Shimizu
* version-upgrades:
  Upgrade to Logback 1.1.6
9 years ago
Kazuki Shimizu b4b7e7ead3 Upgrade to Logback 1.1.6
Closes gh-5410
9 years ago
Andy Wilkinson e7bb67fa33 Upgrade to SLF4J 1.7.20
Closes gh-5408
9 years ago
Phillip Webb 39140945b5 Polish 9 years ago
Andy Wilkinson 1043239de0 Ignore non-JavaExec run task when finding application's main class
Previously, FindMainClassTask would look for a property named main
on any class named run. This was based on the assumption that the
run task would be a JavaExec task (typically provided by the
application plugin). If the run task was not a JavaExec task (more
accurately, if it did not have a main property) this would result in
a build failure due to trying to read a non-existent property.

This commit updates FindMainClassTask to only use the main property
of the run task if the task is a JavaExec task. This guarantees that
the property will exist on the task, and unlike using any property
named main on a task named run, also guarantee that its value will
refer to a Java class with a main method.

Closes gh-5501
9 years ago
Stephane Nicoll ae095b2c1b Disable JMX Integration support if necessary
This commit fixes `IntegrationAutoConfiguration` to actually rely on the
auto-configured `MBeanServer` rather than attempting to create it again.

If JMX support is disabled, no attempt to register integration-related
MBeans is made.

Closes gh-5309
9 years ago
Stephane Nicoll 3363415712 Polish documentation
Add a reference ot underscore notation

Closes gh-5268
9 years ago
Phillip Webb 0a7a283f45 Apply logging system properties on reinitialize
Restore Spring Boot 1.3.2 behavior of re-applying system properties
when SLF4J based loggers are re-initialized. Reapplying system
properties is required when using the Spring Cloud config server since
PropertySourceBootstrapConfiguration directly calls the system
initialize method.

Fixes gh-5491
9 years ago
Stephane Nicoll 422f3d12a3 Merge pull request #5489 from garyrussell/amqp-update13
* pr/5489:
  Upgrade Spring AMQP to 1.5.5.RELEASE
9 years ago
Gary Russell 67cffaebcc Upgrade Spring AMQP to 1.5.5.RELEASE
Closes gh-5489
9 years ago