Commit Graph

2644 Commits (88828f5097dd1161e753f1c1dacb07c36cfe1ab8)
 

Author SHA1 Message Date
Phillip Webb 88828f5097 Use MongoDbFactory to create GridFsTemplate
Update MongoDataAutoConfiguration to use the MongoDbFactory when
creating GridFsTemplate.

Fixes gh-1295
10 years ago
Phillip Webb d854c09d5a Add option to disable `X-Application-Context`
Add `management.add-application-context-header` option to disable
the automatic adding of the `X-Application-Context` HTTP header.

Fixes gh-1308
10 years ago
Phillip Webb 621649d9c6 Document @ConfigurationProperties on @Bean methods
Minor javadoc edits to hint that @ConfigurationProperties can also be
used with @Bean methods.

Fixes gh-1330
10 years ago
Phillip Webb 92899474ac Polish 10 years ago
Andy Wilkinson 7d213950ad Never run data.sql scripts if spring.datasource.initialize is false
Previously, the data scripts were always run in response to the
publication of a DataSourceInitializedEvent, irrespective of
spring.datasource.initialize. While the event won't be published by
DataSourceInitializer if spring.datasource.initialize is false, it
will be published if spring.jpa.hibernate.hbm2ddl.auto has been set.

This commit updates DataSourceInitializer's handling of
DataSourceInitializedEvent to only run the data scripts if
spring.datasource.initialize is true.

Fixes #1336
10 years ago
Andy Wilkinson e185793396 Update test to correct name of metric for request that returns a 401
The request is being made to '/' and, while the application does have
a mapping for '/', that mapping is not looked for before Spring
Security's filter rejects the request with a 401. This means that the
request is considered to be unmapped and this is reflected in the
metric's name.

See #1331 and #1333
10 years ago
Dave Syer 1259057acb Change unknownPath to unmapped 10 years ago
Taylor Wicksell 733b22f46a gh-1331 defaulting 404 response metrics to "unkownPath" when no matching handler can be found
Fixes gh-1331, Fixes gh-1333
10 years ago
Taylor Wicksell c6f5961ad6 fix for gh-1331 MetricFilter now supports uri template variables when available 10 years ago
Dave Syer 0c6a0bde5f Export SPRING_HOME for commands to consume if needed 10 years ago
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
10 years ago
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
10 years ago
Dave Syer 6c5f8f9581 Add @Inherited to @EnableAutoConfiguration
Fixes gh-1328
10 years ago
Dave Syer 6ba8269db8 Add public getter for dependency context 10 years ago
Dave Syer 59b8fc63d9 Scan for a valid MANIFEST.MF instead of taking the first one
Fixes gh-1321
10 years ago
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
10 years ago
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
10 years ago
Andy Wilkinson b7299708f8 Upgrade to Spring HATEOAS 0.16.0
Closes #1307
10 years ago
Andy Wilkinson b69a5dab80 Upgrade to Spring Data Dijkstra SR3
Closes #1305
10 years ago
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
10 years ago
Andy Wilkinson 86d47f62db Upgrade to Groovy 2.3.6
Closes #1304
10 years ago
Phillip Webb f8bf0e2031 Polish 10 years ago
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
10 years ago
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
10 years ago
Dave Syer 702253bc08 Update git properties plugin 10 years ago
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
10 years ago
Andy Wilkinson cba50b8ee7 Upgrade to Groovy 2.3.5
Closes #1299
10 years ago
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
10 years ago
Dave Syer 8c15b13fda Change private method name 10 years ago
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
10 years ago
Andy Wilkinson f5c8a8879a Isolate CLI integration tests from any settings decryption failures 10 years ago
Andy Wilkinson 4d4cc076c6 Don't fail hard when settings.xml can't be decrypted by the CLI 10 years ago
Christian Dupuis 68163a66a5 Change query in MongoHealthIndicator
This commit changes the query in MongoHealthIndicator from serverStatus to buildInfo to avoid unprivileged access and corresponding errors.

fixes #1289
10 years ago
Andy Wilkinson 7945b29669 Correct the descriptions of two sample projects 10 years ago
Andy Wilkinson 664319009c Correct the profile name in Travis configuration 10 years ago
Dave Syer ac2ab39a54 Use class name not value to support non-Hibernate JPA vendors
With this change I got a simple Eclipselink version of the data-jpa
sample working. I'll push that when I get time to research it a bit more
(I needed to set up a Java agent so either that might be a problem
for our integration tests if we can't work around it).

Fixes gh-1268.
10 years ago
Christian Dupuis 99b3240ab2 Ensure custom HTTP code mappings for /health don't remove default mappings
Previously any custom http code mapping would remove the default mappings. With this commit the behaviour is changed so that default mappings will stay if a custom mapping is registered. Certainly a default mapping can be overridden.

fixes #1264
10 years ago
ddebree 5e02ee6974 Add java options for Heroku Procfile
Added $JAVA_OPTS variable to the sample Heroku Procfile.
If this is left out it can cause memory issues when the app starts.

Fixes gh-1266
10 years ago
Stephane Nicoll 16c2477da2 Documentation update
This commit fixes some inconsistent or outdated keys in the
documentation. More specifically:

* allowSessionOverride is no longer a template parameter
* templateEncoding has been renamed to charSet
* Groovy templates do not have the same configuration hierarchy, hence
  they don't share all settings
* spring.data.elasticsearch.local does not seem to exist
* flyway prefix and suffix should be sqlMigrationPrefix and suffix
* spring.rabbitmq.virtualHost had a typo
* endpoints.error.path is not a valid property
* shell.command-path-patterns had a typo
* spring.datasource.max-wait had a typo

Fixes gh-1226
10 years ago
Dave Syer 300e570f68 Reverse priority of property sources when extracting sub properties
Fixes gh-1259
10 years ago
Dave Syer a9b8563bb6 Fix typo (fixes gh-1273) 10 years ago
Andy Wilkinson 0a70bd44ed Correct the default Logback config location in the documentation
Fixes #1247
10 years ago
Dave Syer 4a33ab5577 Make sure ErrorPageFilter is only applied once per request
Fixes gh-1257
10 years ago
Dave Syer 0c52817c88 Ensure order is preserved in Rabbit addresses
Using StringUtils.commaDelimitedListToSet() does not preserve order (why?),
so we have to use commaDelimitedListToStringArray().

Fixes gh-1262
10 years ago
Dave Syer 8853c7c352 Ensure properties that are not enumerable can be resolved from placeholders
Before this change a property whose key was in a non-enumerable property source would
not resolve placeholders, leading to ${style} values in @ConfigurationProperties beans
even if the placeholders ere resolvable.
10 years ago
Andy Wilkinson 672d713f99 Add dependency management for spock-spring and document its use
Closes #1234
10 years ago
Andy Wilkinson 124418f83f Upgrade to HikariCP 1.4.0
Closes #1220
10 years ago
Andy Wilkinson 6cac7926d9 Upgrade to Groovy 2.3.4
Closes #1224
10 years ago
Ilayaperumal Gopinathan 341412d5b5 Fix LoggingApplicationListener
- If `logging.config` is set and could open/read the resource
then, return.
  - Currently, it logs warning though the resource is successfully
read.
10 years ago
Lukasz Kryger 51196e01d5 Dependencies for json-path in BOM 10 years ago