Commit Graph

1671 Commits

Author SHA1 Message Date
Stephane Nicoll 389acb094b Merge branch '1.4.x' into 1.5.x 2016-11-05 07:43:09 +01:00
Johnny Lim ec9f0ab6b4 Polish
Closes gh-7322
2016-11-05 07:42:37 +01:00
Phillip Webb f15e0482c5 Merge branch '1.4.x' into 1.5.x 2016-11-04 16:01:02 -07:00
Phillip Webb 1bd53ea9d8 Support package private requestFactory classes
Update `RestTemplateBuilder` to support package private `requestFactory`
classes.

Fixes gh-7319
2016-11-04 15:58:27 -07:00
Andy Wilkinson 90cc322c5e Merge branch '1.4.x' into 1.5.x 2016-11-01 10:36:30 +00:00
Andy Wilkinson 4919c6f30c Ignore scoped targets when collecting servlet context initializer beans
Previously, there were two problems with servlet context initializer
beans that are a scoped proxy:

1. When there's no explicit registration bean the target of the scoped
   proxy is registered rather than the proxy. This meant that the
   proxy had no effect as it was being bypassed.
2. When there is an explicit registration bean, the registration is
   performed twice: the faulty implicit registration described above
   and explicit registration.

A fix (SPR-14816) has been made in Spring Framework so that we can
correctly determine the type of bean that will be produced by a
scoped proxy's factory bean. That change, coupled with the change in
this commit that ignored beans that are the target of a scoped proxy
addresses both of the problems described above. A single registration
is now performed and its the scoped proxy, rather than its target,
that is registered.

Closes gh-7150
2016-11-01 10:24:33 +00:00
Phillip Webb 5b66ffbb4b Merge branch '1.4.x' into 1.5.x 2016-10-31 23:09:36 -07:00
Phillip Webb 1b17677e0b Polish TLD skip pattern support
See gh-5010
2016-10-31 23:09:24 -07:00
Mike Youngstrom 970dcc3fd3 Support ApplicationReadyEvent from PidFileWriter
Update `ApplicationPidFileWriter` to support `ApplicationReadyEvent` in
addition to the already supported `ApplicationEnvironmentPreparedEvent`
and `ApplicationPreparedEvent` events.

Closes gh-7066
Fixes gh-7027
2016-10-31 16:34:27 -07:00
Johnny Lim 7bb63238ab Fix typo
Closes gh-7253
2016-10-31 11:37:52 +01:00
Stephane Nicoll 4f06e52d7e Allow adding additional tld skip patterns
This commit improves `TomcatEmbeddedServletContainerFactory` so that tld
skip patterns can be set or added to an existing set. An additional
`server.tomcat.additional-tld-skip-patterns` is now being exposed to
easily add patterns via configuration.

Closes gh-5010
2016-10-31 10:15:16 +01:00
Stephane Nicoll ed7de8eb60 Polish contribution
Also add rotate attribute to Undertow

Closes gh-7225
2016-10-26 11:31:17 +02:00
Phillip Webb a448183681 Polish `/loggers` actuator endpoint
See gh-7086
2016-10-24 10:24:36 -07:00
Ben Hale 06cb4fcca5 Add `/loggers` actuator endpoint
Add `LoggersEndpoint` that can enables listing and configuration of log
levels. This actuator builds on top of the `LoggingSystem` abstraction
and implements support for Logback, Log4J2, and JUL.  The LoggingSystem
interface is modified to require each implementation to list the
configuration of all loggers as well as an individual logger by name.

The MVC endpoint exposes these behaviors at `GET /loggers` and
`GET /loggers/{name}` (much like the metrics actuator).

In addition `POST /loggers/{name}` allows users to modify the level for a given
logger. This modification is passed to the logging implementation, which
then decides, as an internal implementation detail, what the final outcome
of the modification is (e.g. changing all unconfigured children). Users
are then expected to request the listing of all loggers to see what has
changed internally to the logging system.

Closes gh-7086
2016-10-24 10:24:36 -07:00
Stephane Nicoll ae4dd0d17e Merge branch '1.4.x' into 1.5.x 2016-10-24 18:08:23 +02:00
Stephane Nicoll a638dcd51b Remove unnecessary use of System.out.println 2016-10-24 18:07:40 +02:00
Andy Wilkinson 570b292df7 Disable JspServlet's development mode by default
This commit switches off the auto-configured JspServlet's
development mode by default. Development mode is then switched on
when DevTools is on the class path.

Closes gh-7039
2016-10-20 21:02:21 +01:00
Andy Wilkinson 129c20965b Merge branch '1.4.x' into 1.5.x 2016-10-19 14:24:24 +01:00
Andy Wilkinson 943a054b61 Remove ineffective, premature optimisation from ErrorPageFilter
ErrorPageFilter contained an optimisation for looking up the path
of an error page by exception type. For cases where there was no
mapping for the type of the exception that was thrown but there
was a mapping for one of its super classes, it was intended to
speed up the lookup. Unfortunately, there was a bug in the
implementation which meant that the optimisation had no effect.

Analysis with JMH reveals that for an Exception with a deep type
hierarchy, such as Spring Framework's UnsatisfiedDependencyException,
and an error page mapping for Exception, searching up the hierarchy
until a mapping is found takes 0.0000001s. With the same mapping,
a lookup for Exception takes 0.00000001s, i.e. it's 10x faster.
The optimisation, when correctly implemented, brings the time for
UnsatisfiedDependencyException down to 0.00000001s and into line
with a lookup for Exception. However, the amount of time involved is
so small compared to the overall time spent processing a request that
the added complexity of the optimisation is not justified.

Closes gh-7010
2016-10-19 14:10:34 +01:00
Andy Wilkinson a416f496c0 Clean up deprecation and unused code warnings 2016-10-18 20:43:05 +01:00
Phillip Webb d818a09ed8 Polish 2016-10-11 23:38:14 -07:00
Phillip Webb d3e06c4627 Merge branch '1.4.x' into 1.5.x 2016-10-11 21:46:06 -07:00
Phillip Webb db3f488d5a Polish 2016-10-11 17:54:00 -07:00
Stephane Nicoll 3e1425ebed Polish contribution
Closes gh-6543
2016-10-10 10:43:12 +02:00
Andy Wilkinson d2d911ba94 Merge branch '1.4.x' into 1.5.x 2016-10-07 17:08:20 +01:00
Andy Wilkinson a5b4c8e6db Make cycle clearer in bean currently in creation failure analysis
Note: the fully-qualified references to @Configuration in some of the
test configuration classes are required to work around a bug in javac.
1.8.0_102 (and earlier). Without them, compilation fails as it cannot
resolve the symbol despite the import statement and the unqualified
references working elsewhere in the same source file.

Closes gh-7056
2016-10-07 17:07:44 +01:00
Stephane Nicoll d57f3afdd3 Add XA datasource for Apache Derby
Closes gh-6823
2016-10-07 10:23:13 +02:00
Stephane Nicoll 02b0e3955c Merge branch '1.4.x' into 1.5.x 2016-10-07 09:46:21 +02:00
Johnny Lim 1c4c0c6119 Fix String.format() usages
Closes gh-7120
2016-10-07 09:45:43 +02:00
Stephane Nicoll 0fe0ad4cfb Merge branch '1.4.x' into 1.5.x 2016-10-06 13:35:32 +02:00
Stephane Nicoll 668993c4bf Fix typo
Closes gh-7117
2016-10-06 13:35:21 +02:00
Phillip Webb a2315378d4 Formatting 2016-10-03 22:44:36 -07:00
Phillip Webb f2b0fa284e Merge branch '1.4.x' into 1.5.x 2016-10-03 22:38:22 -07:00
Phillip Webb 3326841a97 Formatting 2016-10-03 22:19:35 -07:00
Stephane Nicoll a9b610c4fc Deprecate ResourceLoaderAware callback
Closes gh-6986
2016-10-03 11:42:46 +02:00
Stephane Nicoll e643fc5bd1 Merge branch '1.4.x' into 1.5.x 2016-10-02 11:08:33 +02:00
Johnny Lim 503d735fdd Polish
Closes gh-7081
2016-10-02 11:07:04 +02:00
Andy Wilkinson 2a035d0748 Remove support for Velocity following its deprecation in 1.4
Closes gh-6971
2016-09-29 15:44:36 +01:00
Andy Wilkinson 26c9d5a7e2 Merge branch '1.4.x' into 1.5.x 2016-09-29 14:28:20 +01:00
Andy Wilkinson bacdc204ae Polish imports 2016-09-29 14:27:42 +01:00
Stephane Nicoll 984b02dc7f Upgrade to Undertow 1.4.3.Final
Closes gh-7019
2016-09-26 12:43:24 +02:00
Andy Wilkinson bdc949d1b7 Remove deprecated merge and locations attributes from @ConfigurationProperties
Closes gh-6972
2016-09-21 20:50:21 +01:00
Stephane Nicoll ce1e41dce3 Remove deprecated code
This code removes code deprecated in 1.4 with the exception of code that
requires an update to Spring Framework 5.

Closes gh-6971
2016-09-21 14:30:28 +02:00
Stephane Nicoll 6bd670edbc Initiate 1.4.x branch 2016-09-21 11:11:24 +02:00
Spring Buildmaster 7e9ed5e1a7 Next Development Version 2016-09-21 07:58:07 +00:00
Phillip Webb 51092af739 Polish 2016-09-20 14:32:09 -07:00
Phillip Webb 0b9667c26f Drop setResolvePlaceholders()
Remove setResolvePlaceholders() from PropertySourcesPropertyValues
and instead rely only on the constructor.

See gh-6964
2016-09-20 14:22:51 -07:00
Phillip Webb 7896ec5a7b Polish 2016-09-20 14:20:52 -07:00
Andy Wilkinson 564207b092 Add Tomcat-specific failure analysis for connector start failures
Previously, when a Tomcat connector failed to start it was assumed that
the failure was due to the port being in use and a PortInUseException
was thrown. Unfortunately, this assumption doesn’t always hold true.
For example, a Tomcat connector will also fail to start when its using
SSL and the key store password is wrong. This could lead to incorrect
guidance from the PortInUseFailureAnalyzer indicating that a port clash
had occurred when, in fact, it was the SSL configuration that needed to
be corrected.

Unfortunately, Tomcat only tells us that the connector failed to start.
It doesn’t provide access to the exception that would allow us to
determine why it failed to start. This commit updates the embedded
Tomcat container to throw a ConnectorStartFailedException in the event
of a connector failing to start. A new failure analyser,
ConnectorStartFailureAnalyzer, has been introduced to analyse the new
exception and offer some more general guidance.

Closes gh-6896
2016-09-20 13:55:10 +01:00
Dave Syer 26a90c1d24 Add flag to PropertiesConfigurationFactory to switch off placeholder resolution
The default behaviour is unchanged, but it is useful for some applications to be
able to bind without placeholder resolution (e.g. to prevent exposing system
environment variables, if the bound object is being sent over the wire).
2016-09-20 10:13:54 +01:00