Commit Graph

7179 Commits

Author SHA1 Message Date
Andy Wilkinson
f1793bbe31 Upgrade to Reactor 2.0.8.RELEASE
Closes gh-5872
2016-05-05 17:58:08 +01:00
Andy Wilkinson
5f20504d3b Upgrade to Embedded Mongo 1.50.3
Closes gh-5871
2016-05-05 17:56:52 +01:00
Andy Wilkinson
71f7cf581b Upgrade to Undertow 1.3.22.Final
Closes gh-5858
2016-05-05 17:56:13 +01:00
Andy Wilkinson
34420a8768 Allow @ConditionalOnProperty to be used as a meta-annotation
Closes gh-5819
2016-05-05 17:33:18 +01:00
Andy Wilkinson
147956a7b2 Avoid creating multiple BeanNameViewResolver beans
ErrorMvcAutoConfiguration creates a BeanNameViewResolver bean in case
the user has used @EnabledWebMvc and disabled WebMvcAutoConfiguration.
If the user hasn’t used @EnabledWebMvc, WebMvcAutoConfiguration will
creates its BeanNameViewResolver and override the one that’s already
been defined by ErrorMvcAutoConfiguration.

This commit makes WebMvcAutoConfiguration’s BeanNameViewResolver
definition conditional on there being no existing BeanNameViewResolver
bean definition.

Closes gh-5354
2016-05-05 16:10:36 +01:00
Andy Wilkinson
ca15de459c Start building against Spring Framework 4.2.6 snapshots
See gh-5322
2016-05-05 09:13:30 +01:00
Dave Syer
905451f92e That BaseConfiguration thing didn't work out after all
It seems like a base class that defines `@Beans` just doesn't
define any beans. Oh well, time to copy-paste.
2016-05-04 21:01:40 +01:00
Dave Syer
1babdd5c2e Remove log config for non boot things 2016-05-04 14:22:41 +01:00
Dave Syer
e98264debf Move base configuration class to a separate file
to stop it from being included in the enclosing @Configuration.

That way, if the app is not a web app, then there really is a
client_credentials OAuth2 resource (as claimed in the user guide).

Fixes gh-5735
2016-05-04 14:02:00 +01:00
Stephane Nicoll
42af5ebc2c Fix class name
Closes gh-5823
2016-05-02 14:17:48 +02:00
Stephane Nicoll
248bad34dc Fix RedisProperties link in the doc
Closes gh-5811
2016-05-02 14:15:55 +02:00
Stephane Nicoll
4ccc7dc554 Ignore invalid accessors
Previously, if a void method with a single argument was named "set", the
annotation processor wrongly considered it was a setter candidate. This
commit updates the condition to ignore it.

Closes gh-5826
2016-05-02 10:38:19 +02:00
Cristian Greco
5d55d57f78 Fix doc about running native commands
Closes gh-5829
2016-04-30 10:21:41 +02:00
Phillip Webb
ef7b511b0e Polish 2016-04-28 09:29:49 -07:00
Dave Syer
9c0679b1f4 Add support for spring.rabbitmq.ssl.algorithm
Rabbit client 3.6.* uses TLSv1.1 as the default algorithm which
many brokers are deisabling these days. Spring AMQP supports
changing the algorithm by name, so this is just a pass thru for
that.
2016-04-28 10:27:51 +01:00
Andy Wilkinson
71fddc51df Upgrade to Spring Batch 3.0.7.RELEASE
Closes gh-5166
2016-04-27 09:27:16 +01:00
Stephane Nicoll
ac8e87d79f Polish contribution
Closes gh-5782
2016-04-26 09:24:37 +02:00
Venil Noronha
d5554e0aa1 Use static-locations properties to locate favicon
Closes gh-5751
2016-04-26 09:09:19 +02:00
Stephane Nicoll
247685e992 Add missing @Documented
Closes gh-5786
2016-04-26 08:29:20 +02:00
Dave Syer
568d716c99 Move OAuth2ClientContextFilter back before the main security filter
It sometimes has to catch an exception from the security filter so
it needs to be before, and somehow this hasn't been a problem up to
now, but probably only by some fluke.

Fixes gh-5792
2016-04-25 16:44:43 +01:00
Dave Syer
b9db4742ac Add metric flusher to export remaining metrics on shutdown
Before this change the app context closes and metrics that have not
yet been exported ccan be orphaned. The design of this feature is simple:
use Closeable where possible, so that it will be called automatically
by Spring on shutdown.

Fixes gh-5771
2016-04-22 09:33:18 +01:00
Dave Syer
de0f0ecce4 Align counter behaviour between metric exporters
The MetricCopyExporter has had the capability for a while to keep
track of counters internally. This change aligns that with the
PrefixMetricGroupExporter.

Fixes gh-5762
2016-04-21 14:02:29 +01:00
Andy Wilkinson
97934aaf82 Upgrade to Jetty 9.2.16.v20160414
Closes gh-5757
2016-04-21 09:55:46 +01:00
Andy Wilkinson
125483e7aa Add a note in the docs that default launch script only works on Linux
Closes gh-5446
2016-04-20 17:46:36 +01:00
Andy Wilkinson
7709543e67 Set web application context on ServletContext in plain web app tests
Previously, the web application context was only set on the
ServletContext in a full-blown integration test or when MockMvc was
used.

This commit updates SpringApplicationContextLoader so that the context
is also set on the context in a plain web application test (one where
MockMvc is not being used). The change is a partial backport of commit
7dffb702.

Closes gh-4370
2016-04-20 10:39:42 +01:00
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
2016-04-19 11:41:21 +01:00
Andy Wilkinson
432969e61e Correct documented spring.factories key for management context config
Closes gh-5664
2016-04-18 17:41:44 +01:00
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
2016-04-18 17:26:13 +01:00
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
2016-04-18 16:56:54 +01:00
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
2016-04-18 15:30:23 +01:00
Andy Wilkinson
b554894bb4 Polishing 2016-04-15 17:27:19 +01:00
Andy Wilkinson
1fbd43bdf0 Tolerate jar files with no manifest in ChangeableUrls
Closes gh-5704
2016-04-15 17:18:00 +01:00
Phillip Webb
a2f482b7f3 Merge pull request #5053 from spauk/master
* pull5053:
  Make UserInfoTokenServices.getPrincipal protected
2016-04-12 14:41:07 -07:00
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
2016-04-12 14:40:37 -07:00
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
2016-04-12 14:36:36 -07:00
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
2016-04-12 13:47:58 +01:00
Phillip Webb
af2483816b Fix JarFileTests to work on Windows
See gh-5287
2016-04-10 12:12:19 -07:00
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
2016-04-09 23:32:39 -07:00
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
2016-04-09 23:32:39 -07:00
Phillip Webb
3ca365cff0 Export MessageChannel metric writer
Update the auto-configured MessageChannelMetricWriter with
@ExportMetricWriter so that metrics are actually exported.

Fixes gh-5517
2016-04-09 23:32:38 -07:00
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
2016-04-09 23:32:38 -07:00
Phillip Webb
084b288947 Polish 2016-04-09 21:43:15 -07:00
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
2016-04-07 17:44:38 +01:00
Andy Wilkinson
7f3d4adfef Merge pull request #5289 from Vladimir Tsanev
* gh-5289:
  Polish contribution
  Update JarURLConnection to support jar:file://… URLs
2016-04-06 17:05:56 +01:00
Andy Wilkinson
74e27db486 Polish contribution 2016-04-06 17:04:10 +01:00
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
2016-04-06 17:02:59 +01:00
Andy Wilkinson
d6ad4dcc11 Merge pull request #5397 from Vedran Pavic
* gh-5397:
  Improve repeatability of launch script tests
2016-04-06 13:28:44 +01:00
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
2016-04-06 13:28:16 +01:00
Andy Wilkinson
30626b52aa Merge pull request #5394 from Christian Brunotte
* gh-5394:
  Update launch.script so popd does not print directory name to stdout
2016-04-06 11:47:34 +01:00
Christian Brunotte
677080b8e2 Update launch.script so popd does not print directory name to stdout
Closes gh-5394
2016-04-06 11:46:36 +01:00