Commit Graph

4537 Commits

Author SHA1 Message Date
Phillip Webb
48009bfebe Allow relaxed property name overrides
Update RelaxedDataBinder to so that property ordering is respected even
if relaxed names are used. Prior to this commit a System property named
`FOO_BAR` would never get bound to a `fooBar` field if `foo-bar` was
defined in application.properties.

Fixes gh-3385
2015-07-01 21:38:34 -07:00
Phillip Webb
04dfac1c6c Formatting 2015-07-01 19:29:25 -07:00
Phillip Webb
3ef667f0d8 Fix MetricWriterMessageHandler to deal with reset
Update MetricWriterMessageHandler to deal with 'reset' messages and to
log unsupported payload types.

Fixes gh-3378
2015-07-01 18:11:53 -07:00
sopov.ivan
fa7199ddac Fix Eclipse 4.5 formatter settings
Fixes gh-3384
2015-07-01 18:09:56 -07:00
Phillip Webb
a1b87766a7 Fix PropertiesLauncher javadoc
See gh-3392
2015-07-01 18:09:56 -07:00
Stephane Nicoll
441049cf4e Auto-detect JMS sessionTransacted flag
If a JtaTransactionManager is present, it is associated with the
auto-created JmsListenerContainerFactory. However, if no such transaction
manager is present, local transaction support is not enabled.

This gives a default situation where the message is acknowledged even
before the listener is invoked. We now make sure to turn on local JMS
transactions if no JtaTransactionManager is present.

Fixes gh-3393
2015-07-01 12:59:11 -07:00
Andy Wilkinson
f4c95eafc2 Upgrade to Undertow 1.1.7.Final
Closes gh-3382
2015-07-01 14:51:40 +01:00
Andy Wilkinson
e31a4dc028 Upgrade Java Mail to 1.5.4
Closes gh-3381
Closes gh-3383
2015-07-01 14:51:06 +01:00
Andy Wilkinson
159d3a3346 Upgrade to nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect 1.2.9
Closes gh-3380
2015-07-01 14:50:23 +01:00
Andy Wilkinson
bb8df95fbf Upgrade to HSQLDB 2.3.3
Closes gh-3379
2015-07-01 14:49:39 +01:00
Andy Wilkinson
b1ad2c30eb Ignore type-constrained converter when auto-configuring Jackson converter
Previously, JacksonHttpMessageConvertersConfiguration would configure a
general-purpose MappingJackson2HttpMessageConverter only if there was
no existing MappingJackson2HttpMessageConverter in the application
context. This was problematic when a
TypeConstrainedMappingJackson2HttpMessageConverter bean was present.
Such a bean is only capable of performing conversion for a specific
type, and therefore is no substitute for a general purpose converter,
yet its presence was causing the auto-configuration of a general
purpose converters to be turned off. This would leave Spring MVC’s
default converter being used for application/json requests which would
not honour the user’s Jackson configuration.

This commit enhances @ConditionalOnMissingBean so that the annotation
can be used to specify one or more types that should be ignored when
searching for beans. This allows the
TypeConstrainedMappingJackson2HttpMessageConverter beans that are
published by Spring Data REST to be ignored such that the
general-purpose MappingJackson2HttpMessageConverter is still
auto-configured.

Fixes gh-2914
2015-07-01 14:28:19 +01:00
Andy Wilkinson
663967f61b Update to Spring Data Evans SR3
Closes gh-3369
2015-07-01 14:26:34 +01:00
sopov.ivan
968b1d7425 Add Eclipse 4.5 new workspace folder to .gitignore
Closes gh-3375
2015-07-01 05:35:16 -07:00
Phillip Webb
8ec10c8425 Use buildView() to create MustacheView
Update MustacheViewResolver so that buildView() is called to create
the MustacheView. This sets fields such as `contentType` and allows us
to remove explicit setApplicationContext() and setServletContext()
calls.

Fixes gh-3265
2015-06-30 14:51:48 -07:00
Phillip Webb
1ecc9c8a8b Upgrade to Spring Framework 4.1.7.RELEASE
Fixes gh-3276
2015-06-30 13:51:19 -07:00
Phillip Webb
a89139c06b Allow case insensitive logging.level properties
Fixes gh-3356
2015-06-30 13:49:45 -07:00
Andy Wilkinson
5a1e66b3d6 Make GzipFilterAutoConfiguration conditional on HttpMethod
GzipFilterProperties uses HttpMethod so GzipFilterAutoConfiguration,
which uses GzipFilterProperties, needs to be conditional on HttpMethod
being on the classpath.

Closes gh-3362
2015-06-30 12:32:29 +01:00
Phillip Webb
76348e50e6 Merge pull request #3324 from mbenson/actuator-sample-ant
* pr/3324:
  Fixup sample Ant build
2015-06-30 00:55:06 -07:00
Matt Benson
183a2095f4 Fixup sample Ant build
Fixes gh-3324
2015-06-30 00:54:53 -07:00
Andy Wilkinson
f8fdcc1312 Include value of java.io.tmpdir in message when createTempFile fails
If java.io.tmpdir is configured to a directory that does not exist,
calls to File.createTempFile will fail with an IOException with the
message "The system cannot find the path specified". Unfortunately,
the path the was specified is not included in the message.

Rather than trying to automatically create the directory in what may
be a misconfigured location, we now include the value of
java.io.tmpdir in our own exception's message. Hopefully this will
help users to figure out what they've done wrong.

Closes gh-3307
2015-06-24 17:13:18 +01:00
Stephane Nicoll
982b81c675 Fix datasource metrics doc
The maximum and minimum number of connections are no metrics so these
are not exposed. Fix the doc that stated the contrary.

Fixes gh-3319
2015-06-24 17:20:31 +02:00
Phillip Webb
16e7c99e4d Polish formatting 2015-06-23 09:45:54 -07:00
Onur Kağan Özcan
2d153ca745 Upgrade to Spring Mobile 1.1.4.RELEASE
Closes gh-3308
2015-06-23 14:13:50 +01:00
Matt Benson
80deaf6456 Fix absolute file detection on Windows
Closes gh-3299
2015-06-23 14:16:54 +02:00
Andy Wilkinson
6fd3042462 Align servlet container error handling with executable jar/war behavior
Previously, when an exception was thrown by a Controller in an
application deployed to a servlet container the exception that was
handled would be Spring Framework’s NestedServletException rather than
the exception thrown by the application. Furthermore, when an exception
was thrown or the response was used to send an error, the
javax.servlet.error.request_uri request attribute would not be set. This
differed from the behaviour in an executable jar/war where the exception
would be the one thrown by the application, and the request_uri
attribute would be set.

This commit updates ErrorPageFilter, which is only involved in a servlet
container, to unwrap a NestedServletException so that it’s the
application’s exception that’s handled, and to set the request_uri
attribute in the event of an exception being thrown or an error being
sent.

Closes gh-3249
2015-06-22 16:27:00 +01:00
olivier bourgain
5ed2a9632b Make InMemoryTraceRepository thread-safe
Closes gh-3027
2015-06-22 15:30:00 +01:00
Andy Wilkinson
8681a8ad2a Map empty virtual host to "/" when parsed from an address
Previously, an address that ended in a "/" would result in the virtual
host being an empty string. This was inconsistent with setVirtualHost
which would map an empty string to "/".

This commit updates the address parsing logic to call setVirtualHost
rather than assigning the value directly to this.virtualHost. This
ensures that the special handling for an empty string is applied
consistently.

Closes gh-3304
2015-06-22 15:20:41 +01:00
Andy Wilkinson
cd62596e82 Provide default for SpringApplication main class in servlet container
By default, SpringApplication attempts to deduce the application class
by looking for a main method in the stack. This does not work when
the application is launched by a servlet container via
SpringBootServletInitializer as there's either no main method in the
stack, or the main method is that of the servlet container, rather
than the application.

This commit updates SpringBootServletInitializer to configure the
main class of the SpringApplication that it creates to be the
application's SpringBootServletInitializer subclass. This is done
prior to calling configure, so the main class can still be specified
by the application if required.

Closes gh-3061
2015-06-22 14:07:40 +01:00
Andy Wilkinson
01ba0f7571 Make RemoteIpValve's protocolHeaderHttpsValue configurable via the env
Closes gh-3289
2015-06-22 13:44:09 +01:00
Stephane Nicoll
5f2ffdb9e2 Update SnakeYAML link
Closes gh-3302
2015-06-22 10:44:23 +02:00
Josh Thornhill
a1e3a5a861 Fix missing space in logging message
Closes gh-3298
2015-06-21 06:40:24 +02:00
Phillip Webb
2b13736ae8 Merge pull request #3255 from mbenson/open-files
* gh-3255:
  Ignore failures when closing war files in tests
2015-06-18 23:25:50 -07:00
Matt Benson
38e935ee5e Ignore failures when closing war files in tests
Update WarPackagingTests to ignore any IOExceptions when closing
created war files. Exceptions were sometimes thrown when running on a
Linux NTFS mount.

Fixes gh-3255
2015-06-18 23:23:07 -07:00
Phillip Webb
1e40bff174 Polish 2015-06-18 12:52:41 -07:00
Andy Wilkinson
7d80f0efea Update tests so that they also work on Windows
See gh-3274
2015-06-18 17:01:09 +01:00
Andy Wilkinson
4d0996b1bd Start building against Spring 4.1.7 snapshots
See gh-3276
2015-06-18 13:34:21 +01:00
Andy Wilkinson
af067ae28b Add files that were accidentally omitted from 5e743fb2
See gh-3274
2015-06-18 13:30:20 +01:00
Andy Wilkinson
5e743fb299 Fully honour local repository location configured in settings.xml
Previously, DefaultRepositorySystemSessionAutoConfiguration would
read the local repository configuration from settings.xml, but did
not perform any property interpolation. This would leave placeholders
such as ${user.home} as-is and result in the use of the wrong
location. To address this, the code that reads settings.xml has been
updated to provide the current System properties as a property
interpolation source.

RepositoryConfigurationFactory configures the local repository as a
"remote" repository when the local repository location has been
overridden. This allows spring grab to copy dependencies from the
local repository into the grab output location (configured via the
grape.root system property) rather than having to download them again.
This logic did not consider the customization of the local repository
location via settings.xml so the dependencies would be downloaded again.
To address this, RepositoryConfigurationFactory has been updated to
attempt to use the location configured in settings.xml, before falling
back to the default location.

The logic that reads settings.xml has deliberately been duplicated. It
could have been extracted into a separate class, but this is only a
temporary measure until gh-3275 is tackled. Duplication was deemed
preferable to adding a new public class in 1.2.x that we’d then want to
remove in 1.3.

Closes gh-3274
2015-06-18 12:37:19 +01:00
Stephane Nicoll
bbb0b7a80b Allow equal or colon in property value
Closes gh-3273
2015-06-18 12:54:53 +02:00
Phillip Webb
cca0b76ac8 Support Velocity toolbox configurations from jar
Create an EmbeddedVelocityToolboxView which supports loading toolbox.xml
files from the application classpath as well as the ServletContext. The
VelocityAutoConfiguration class has been updated to use the new view.

This change allows the `spring.velocity.toolbox-config-location`
property to work with embedded servlet containers.

Fixes gh-2912
2015-06-15 18:08:17 -07:00
Oliver Gierke
1cfc6f64f6 Allow multiple @EntityScan annotations to be used
Update EntityScanRegistrar so that multiple @EntityScan annotations can
be used with a single application. Previously, when an application used
multiple annotations only the first one found would get applied. This
changes alters that to augment the packages that will be scanned.

Fixes gh-2757
2015-06-15 12:21:22 -07:00
Artur Mkrtchyan
d6e24a15de Update logging.path documentation sample
Update appendix example to use the more common `/var/log` folder rather
than `/var/logs`.

Fixes gh-3225
2015-06-15 11:36:03 -07:00
Phillip Webb
20d39f7af2 Polish 2015-06-15 11:31:33 -07:00
Ben Hale
818d3bd230 VcapApplicationListener Boolean Credentials
Previously, the VcapApplicationListener would discard any service
credential value that wasn't a String, Number, Map, Collection, or
null.  This was particularly a problem for services that exposed a
value as a JSON boolean.  This change takes booleans in the credential
payload into account, converting them to Strings so that they will
pass through the properties system properly.  There's no real downside
to this as Spring will coerce them back into Booleans if needed, by
the application.

Fixes gh-3237
2015-06-15 11:24:13 -07:00
Phillip Webb
75ffd1b017 Polish 2015-06-15 11:19:47 -07:00
Phillip Webb
a83d999f27 Add missing MultipartProperties.enabled property
Fixes gh-3209
2015-06-15 11:18:01 -07:00
Phillip Webb
135e9d10a6 Polish 2015-06-15 10:52:02 -07:00
Andy Wilkinson
0253f21f2f Update the link to Bitronix's documentation
Closes gh-3207
2015-06-15 14:25:24 +01:00
Stephane Nicoll
321a149297 Only associate JTA transaction manager
This is related to 38cca9c but for the Rabbit support. Update
RabbitAnnotationDrivenConfiguration to only associate a JTA transaction
manager, if any.

Closes gh-3222
2015-06-15 11:20:03 +02:00
Stephane Nicoll
dc94fafaaa Fix dependency of AmqpAdmin
AmqpAdmin does not require a CachingConnectionFactory. Using the more
general CachingConnectionFactory provides more flexibility.

Closes gh-3220
2015-06-14 10:04:06 +02:00