Commit Graph

58194 Commits

Author SHA1 Message Date
Taylor Wicksell 733b22f46a gh-1331 defaulting 404 response metrics to "unkownPath" when no matching handler can be found
Fixes gh-1331, Fixes gh-1333
2014-08-05 07:55:34 -07:00
Taylor Wicksell c6f5961ad6 fix for gh-1331 MetricFilter now supports uri template variables when available 2014-08-04 17:19:16 -07:00
Dave Syer 26cc628535 Merge branch '1.1.x' 2014-08-04 15:47:54 -07:00
Dave Syer 0c6a0bde5f Export SPRING_HOME for commands to consume if needed 2014-08-04 15:47:38 -07:00
Stephane Nicoll 76729fdf85 Propagate RelaxedConversionService
Prior to this commit, the internal BeanWrapper used by the
RelaxedDataBinder was not using any conversion service at all. This
commit makes sure to propagate the one that has been configured
internally.

Also a dummy call to a [foo] key seems to have been left and has
been removed. This allows to support Enum as map key.

Fixes gh-1242
2014-08-04 15:01:13 -07:00
Dave Syer a7338e18df Merge branch '1.1.x' 2014-08-04 14:56:59 -07:00
Dave Syer 9372d15433 Explicitly set status on raw unwrapped response
The ErrorPageFilter wasn't setting the response status in the case that
there was an error page mapped to the current request (i.e. for all
autoconfigured apps). N.B. this only affects non-embedded apps.

Fixes gh-1320
2014-08-04 14:55:02 -07:00
Dave Syer 68582bbac2 Merge branch '1.1.x' 2014-08-04 08:34:49 -07:00
Dave Syer 6c5f8f9581 Add @Inherited to @EnableAutoConfiguration
Fixes gh-1328
2014-08-04 08:34:06 -07:00
Dave Syer 67ba66dc4c Merge branch '1.1.x' 2014-07-31 15:58:30 -07:00
Dave Syer 6ba8269db8 Add public getter for dependency context 2014-07-31 15:57:41 -07:00
Dave Syer 59b8fc63d9 Scan for a valid MANIFEST.MF instead of taking the first one
Fixes gh-1321
2014-07-31 09:51:49 -07:00
Andy Wilkinson b78d43e0b8 Merge branch '1.1.x' 2014-07-31 13:23:02 +01:00
Andy Wilkinson bacbff1fbf Do not flush response buffer in ErrorPageFilter if request is async
Previously, the ErrorPageFilter would always flush the response
buffer, irrespective of the request being asynchronous. This could
lead to a response being committed prematurely, preventing, for
example, headers being set by subsequent processing.

This commit updates ErrorPageFilter so that in the success case
(status < 400) the response buffer is only flushed if the request is
not async (determined by calling request.isAsyncStarted()). If an
exception's been thrown or the status is >= 400 the response buffer
is always flushed.

Fixes #1316
2014-07-31 13:22:34 +01:00
Andy Wilkinson be2803a776 Merge branch '1.1.x' 2014-07-30 11:10:56 +01:00
Andy Wilkinson 6f8d4778ad Prevent a jar from being repackaged more than once
Previously, Repackager would repackage a jar file as many times as
it was asked to do so. This lead to problems if a user made a mistake
when using Maven that led to the package phase being driven twice,
for example by running "mvn clean install package".

This commit updates Repackager so that a repackage call becomes a
no-op if the source jar's manifest already contains the
Spring-Boot-Version attribute which is added by repackaging.

Fixes #1251
2014-07-30 11:07:41 +01:00
Phillip Webb 642224feff Support regex in keys-to-sanitize
Update EnvironmentEndpoint and ConfigurationPropertiesReportEndpoint
to allow regex patterns in `keys-to-sanitize`.

Fixes gh-1245
2014-07-29 15:13:45 -07:00
Phillip Webb 4f440fcbb9 Java 7 ClassLoader performance improvements
Use Java 7 `registerAsParallelCapable` and `getClassLoadingLock` methods
when possible. This should improve performance when running on JDK 7+
whilst still remaining JDK 6 compatible.

Closes gh-1284
2014-07-29 14:12:52 -07:00
Phillip Webb da5c36c3a9 Polish 2014-07-29 13:06:47 -07:00
Phillip Webb 14c6243637 Refactor PublicMetrics registration
Rework flexible PublicMetrics registration introduced in 2be6b3e4 to
restore compatibility with v1.1 VanillaPublicMetrics. The new
MetricReaderPublicMetrics class now exposes metrics from a MetricReader
and VanillaPublicMetrics is deprecated. The MetricsEndpoint can now
exposes a collection of PublicMetric interface directly.

See gh-1094
2014-07-29 12:31:40 -07:00
Phillip Webb 8e0b3dd00a Rename some ConditionalOnProperty attributes
Rename the newly introduced @ConditionalOnProperty `match` and
`defaultMatch` attributes to `havingValue` and `matchIfMissing`.

Also added a new `name` attribute as an alternative to `value` to
aid readability.

Closes gh-1000
2014-07-29 09:13:58 -07:00
Phillip Webb 6825a7b42e Polish 2014-07-29 09:12:47 -07:00
Oliver Gierke 81cd11b4ec Improved detection of manual Spring Data repository configuration
The presense of store-specific RepositoryConfigurationExtension beans
is used to disable auto-configuration for JPA, Mongo, and Solr

Closes #1267
2014-07-29 15:56:26 +01:00
Andy Wilkinson 636cc5424f Merge branch '1.1.x' 2014-07-29 15:50:27 +01:00
Andy Wilkinson b7299708f8 Upgrade to Spring HATEOAS 0.16.0
Closes #1307
2014-07-29 15:50:09 +01:00
Andy Wilkinson 3639fe2441 Merge branch '1.1.x' 2014-07-29 15:38:05 +01:00
Andy Wilkinson b69a5dab80 Upgrade to Spring Data Dijkstra SR3
Closes #1305
2014-07-29 15:37:50 +01:00
Andy Wilkinson 2abf3ebdc3 Merge branch '1.1.x' 2014-07-29 15:12:11 +01:00
Andy Wilkinson 333bc3e842 Avoid RS.getObject(index, Object.class) as it breaks MySQL on Java 7
Previously, when running on Java 7+, the JDBC query driven by
DataSourceHealthIndicator resulted in a call to
ResultSet.getObject(index, Object.class). When using MySQL's JDBC
driver this failed with an SQLException with the message "Conversion
not supported for type java.lang.Object". The problem does not occur
on Java 6 as the overload of getObject that takes a type does not
exist; ResultSet.getObject(index) is called instead and MySQL happily
returns whatever type it deems to be appropriate for the column.

This commit updates DataSourceHealthIndicator so that
ResultSet.getObject(index) will always be used, irrespective of the
version of Java that Boot is running on.

Closes #1306
2014-07-29 15:11:53 +01:00
Andy Wilkinson 6c718c24d8 Merge branch '1.1.x' 2014-07-29 11:39:53 +01:00
Andy Wilkinson 86d47f62db Upgrade to Groovy 2.3.6
Closes #1304
2014-07-29 11:24:42 +01:00
Max Bruchmann ee40fb8cf1 Add auto-configuration for Thymeleaf data dialect
Closes #1120
2014-07-29 11:12:02 +01:00
Phillip Webb 53d24301d1 Merge branch '1.1.x' 2014-07-28 15:41:42 -07:00
Phillip Webb f8bf0e2031 Polish 2014-07-28 15:40:40 -07:00
Phillip Webb 5e1552b718 Retain default order in HttpMessageConverters
The original fix for gh-1293 (commit 05e6af23) caused test failures due
to the fact that Spring Boot's MappingJackson2HttpMessageConverter was
added before Spring's default StringHttpMessageConverter.

This commit changes the HttpMessageConverters logic so that additional
converts are added just before any default converter of the same type.
This allows additional converters to be added whilst still retaining
the sensible ordering of the default converters.

Fixes gh-1293
2014-07-28 15:40:33 -07:00
Dave Syer 5ce4669055 Merge branch '1.1.x' 2014-07-28 09:32:58 -07:00
Dave Syer 05e6af23cf Prepend without replacing in HttpMessageConverters
It was incorrect to simply replace existing instances because you can't
tell from the instance which media types and java types it supports. This
fix just prepends the custom converters so they get higher priority.

Fixes gh-1293
2014-07-28 09:32:15 -07:00
Dave Syer 702253bc08 Update git properties plugin 2014-07-28 09:32:15 -07:00
Andy Wilkinson ba2c38c803 Merge branch '1.1.x' 2014-07-28 15:42:02 +01:00
Andy Wilkinson 32a19f590d Enable test that relies on class and groovy script configuration
Since Spring 4.0.4, it's now possible to use both classes and
locations to provide a test's configuration.

Closes #1300
2014-07-28 15:39:45 +01:00
Andy Wilkinson 29b388e6a9 Merge branch '1.1.x' 2014-07-28 15:33:54 +01:00
Andy Wilkinson cba50b8ee7 Upgrade to Groovy 2.3.5
Closes #1299
2014-07-28 15:32:44 +01:00
Andy Wilkinson 8583317651 Merge branch '1.1.x' 2014-07-28 14:56:32 +01:00
Andy Wilkinson bd577f1515 Rework Jetty startup so connectors are only started once
Previously the server was started to make the ServletContext
available, then, to prevent requests from being handled before the
application context had been started, the connectors were stopped.
Once application context startup had completed, the connectors were
then started again. In addition to being somewhat inefficient, this
caused problems on FreeBSD where stopping the connector didn't free
up the port quickly enough for the subsequent start to then be able
to bind to it.

This commit updates the Jetty startup logic to be closer to the logic
that's used for Tomcat. Before the server is started, the configured
connectors are cached and then removed. The server is then started
without any connectors. Once application context startup has
completed, the connectors are reinstated and started.

Fixes #968
2014-07-28 14:38:11 +01:00
Dave Syer 13c94172b0 Merge branch '1.1.x' 2014-07-25 08:46:09 -07:00
Dave Syer 8c15b13fda Change private method name 2014-07-25 08:45:40 -07:00
Dave Syer cc51296397 Merge branch '1.1.x' 2014-07-25 08:35:56 -07:00
Dave Syer 32ede50d19 Extract property sources from composite when binding
Often this change will not be important because you are binding to
a bean with strongly typed properties. A bean with a Map property,
on the other hand, won't oytherwise be able to reason about the
permitted keys so it will miss any non-enumerable property sources,
including composites whose nested sources are themselves enumerable.

Fixed gh-1294
2014-07-25 08:34:30 -07:00
Andy Wilkinson f97251b9cf Merge branch '1.1.x' 2014-07-24 20:38:41 +01:00
Andy Wilkinson f5c8a8879a Isolate CLI integration tests from any settings decryption failures 2014-07-24 20:38:21 +01:00