Commit Graph

4537 Commits

Author SHA1 Message Date
Andy Wilkinson
91c497e8bf Upgrade to AspectJ 1.8.8
Closes gh-4996
2016-01-21 20:17:46 +00:00
Phillip Webb
c71aa32fbb Polish 2016-01-21 10:53:25 -08:00
Phillip Webb
af36bf6864 Remove TODO in FlywayAutoConfiguration
Now tracked by gh-4995
2016-01-21 10:42:33 -08:00
Stephane Nicoll
58ebfdcbd3 Polish contribution
Closes gh-4973
2016-01-21 14:10:35 +01:00
Jacques-Etienne Beaudet
a749855cb5 Allow indexed access of flyway.locations
This commit allows to use the `flyway.locations` in an indexed fashion
(i.e. typically in YAML configuration).

See gh-4973
2016-01-21 14:08:39 +01:00
Andy Wilkinson
5ef6903690 Make EmbeddedVelocityToolboxView work in servlet container deployments
EmbeddedVelocityToolboxView is used with both embedded containers and
when a Spring Boot application is deployed to a servlet container. It
process the ServletContext to intercept calls to getResource so that it
can load Velocity’s toolbox.xml file from within an executable jar.
Previously, when it created the proxy, it didn’t specify the ClassLoader
to use. This resulted in the proxy being created using the ClassLoader
that loaded the Class that is being proxied. This fails when the
application is deployed to a ServletContainer as the ClassLoader that
loaded the ServletContext implementation is the container’s ClassLoader
and it cannot see the classes that are specific to the web application.

This commit updates EmbeddedVelocityToolboxView to specify the
ClassLoader to use when creating the proxy. It specifies its own
ClassLoader thereby ensuring that the proxy creation can load
application-specific classes.

Fixes gh-4967
2016-01-19 10:37:02 +00:00
Stephane Nicoll
2ceadd705b Fix documentation of logging.path and logging.file
See gh-4969
2016-01-19 09:33:05 +01:00
Andy Wilkinson
43ed824f40 Reinstate Tomcat’s old default behaviour for context root redirects
Prior to Tomcat 8.0.30, its default behaviour was for the mapper to
redirect a request for context-root to context-root/. This redirection
was switched off by default in 8.0.30 by default. This has proven
to be problematic and Tomcat 8.0.31 will reinstate the old default.

While we are waiting for Tomcat 8.0.31 to be released, this commit
explicitly sets the default back to what it was in 8.0.29 and earlier
and what it will be in 8.0.31.

Closes gh-4937
2016-01-18 15:19:43 +00:00
Andy Wilkinson
2f2bba4d26 Fix docs for using YAML to configure Log4J 2
Previously, the documentation stated that jackson-dataformat-yaml was
the only required dependency. This is incorrect. jackson-databind is
also required.

Closes gh-4924
2016-01-15 12:51:19 +00:00
Andy Wilkinson
b56eef236e Close Reader used by MustacheViewResolver when compiling a Template
Previously, MustacheViewResolver would create an InputStreamReader
that wraps the template Resource's InputStream but would fail to close
the Reader. When the InputStream was a FileInputStream, this caused
the resolver to leak file handles.

This commit updates the resolver to close the Reader once the Template
has been compiled, thereby allowing any underlying resources to be
cleaned up immediately, rather than having to wait for the JVM to exit.

Closes gh-4921
2016-01-15 11:19:24 +00:00
Andy Wilkinson
681a866cce Exclude Java agents from class loader created by PropertiesLauncher
PropertiesLauncher creates a ClassLoader that is used by the Launcher
to load an application’s classes. During the creation of this
ClassLoader URLs from its ClassLoader. This resulted resulting in Java
agents that are added to the system class loader via the -javaagent
launch option being available on both the system class loader and the
created class loader. Java agents are intended to always be loaded by
the system class loader. Making them available on another class loader
breaks this model.

This is the same problem that was in ExecutableArchiveLauncher and
that was fixed in ee08667e (see gh-863).

This commit updates PropertiesLauncher so that it skips the URLs of
any Java agents (found by examining the JVM’s input arguments) when
copying URLs over to the new ClassLoader, thereby ensuring that Java
agents are only ever loaded by the system class loader.

Closes gh-4911
2016-01-14 17:05:08 +00:00
Andy Wilkinson
b99739212a Correct the name of MySQL's XADataSource implementation
Closes gh-4942
2016-01-14 15:53:00 +00:00
Andy Wilkinson
6117b6c5c8 Consistent use of tabs for indentation in pom files 2016-01-12 10:16:40 +00:00
Andy Wilkinson
8410e545b5 Upgrade copyright headers for 2016 2016-01-12 10:12:49 +00:00
zhanhb
fae3397f92 Upgrade to JavaMail 1.5.5
Closes gh-4844
2016-01-04 17:17:39 +00:00
Stephane Nicoll
b94c7c6a1d Guard instantiation of Tomcat's ErrorPage
Closes gh-4839
2015-12-28 14:35:35 +01:00
Stephane Nicoll
12cefd2c2b Only enable Tomcat's websocket support on Java7+
Tomcat's websocket support requires Java7 or later. That commit makes
sure to register its support only when such requirement is met.

Closes gh-4846
2015-12-28 13:49:12 +01:00
Andy Wilkinson
835a11b52a Start building against Spring WS 2.2.5 snapshots
See gh-4789
2015-12-19 10:51:12 +00:00
Stephane Nicoll
bb736e255b Fix SNAPSHOT version 2015-12-17 14:15:14 +01:00
Stephane Nicoll
b719b0271c Upgrade to Spring Framework 4.1.9.RELEASE
Closes gh-4440
2015-12-17 10:20:17 +01:00
Andy Wilkinson
c0c79ab906 Revert "Upgrade to Spring Web Services 2.2.4.RELEASE"
This reverts commit acb3fb5399.

See gh-4789
2015-12-17 08:34:15 +00:00
Andy Wilkinson
43a16146ef Upgrade to Spring Integration 4.1.8.RELEASE
Closes gh-4719
2015-12-16 20:05:04 +00:00
Phillip Webb
ce2a68276c Add ServletContext initialization documentation
Update the documentation to include a section about ServletContext
initialization with embedded servlet containers. This update is to
primarily highlight that `WebApplicationInitializers` and Servlet 3.0+
`ServletContainerInitializers` are not called.

Fixes gh-4643
2015-12-16 18:41:46 +00:00
Andy Wilkinson
acb3fb5399 Upgrade to Spring Web Services 2.2.4.RELEASE
Closes gh-4789
2015-12-16 17:16:11 +00:00
Phillip Webb
edb16a13ee Protect against SpEL injections
Prevent potential SpEL injection attacks by ensuring that whitelabel
error view SpEL placeholders are not recursively resolved.

Fixes gh-4763
2015-12-14 18:49:59 +00:00
Andy Wilkinson
7d5cc3da63 Stop ActiveMQ pooled connection factory when context is closed
Previously, ActiveMQ's pooled connection factory was not closed as
part of the application context being closed. This would leave
non-daemon threads running which could cause shutdown to hang unless
the JVM itself was shutting down (in which case a shutdown hook would
stop the pool).

This commit configures each pooled connection factory bean with a
custom destroy method so that the pool is stopped as part of the
application context being closed. To allow the destroy method to only
be declared when the connection factory is pooled, the bean method
has been split into two; one for pooled and one for non-pooled. This
is a partial backport of the changes made in bedf2edf.

Closes gh-4748
2015-12-14 16:49:18 +00:00
Andy Wilkinson
474ffa717e Upgrade to Spring Batch 3.0.6.RELEASE
Closes gh-4754
2015-12-11 11:25:54 +00:00
Phillip Webb
2694605a4d Polish 2015-12-10 14:43:00 +00:00
Stephane Nicoll
ce2346b087 Reintroduce endpoints.metrics.filter.enabled
Commit 8c14009 removed the endpoints.metrics.filter.enabled property so
that endpoints.metrics.enabled is used for both disabling the endpoint
and the servlet filter that records interactions.

This was an unfortunate decision as it was no longer possible to only
disable the servlet filter. The endpoints.metrics.filter.enabled property
has therefore been restored.

Closes gh-4365
2015-12-10 15:37:10 +01:00
Andy Wilkinson
ce541bebcf Align BasicErrorController’s HTML response status with non-HTML status
Previously, BasicErrorController would return the response status
set in the javax.servlet.error.status_code request attribute when
serving JSON but would also return a 200 OK response when serving
HTML. This didn’t cause much trouble when a person was browsing, but
proved problematic for machine clients that request text/html and care
about the response status. For example, the success handler would be
driven for an XHR request even though the response was really an error.

This commit updates BasicErrorController to set the response status for
text/html responses to match the status that it would use in an
application/json response.

Closes gh-4694
2015-12-10 13:40:16 +00:00
Andy Wilkinson
b36fe2cbd8 Cache outcome of checking to see if host supports ANSI output
Closes gh-4510
2015-12-10 11:15:50 +00:00
Andy Wilkinson
8dc3b71ced Revert "Upgrade to Spring Integration 4.1.7.RELEASE"
This reverts commit bb9e1be72c.

4.1.7.RELEASE is incompatible with Spring IO Platform 1.1.x due to a
new dependency on kryo-shaded. kryo-shaded was introduced in Kryo
3.0.x but IO Platform 1.1.x uses Kryo 2.

See gh-4719
2015-12-10 10:15:05 +00:00
Andy Wilkinson
3b34f635a6 Upgrade to Spring Social Facebook 2.0.3.RELEASE
Closes gh-4738
2015-12-09 20:59:19 +00:00
Andy Wilkinson
ae6971a61a Upgrade to Tomcat 8.0.30 and continue to use absolute redirects
Tomcat 8.0.30 has changed to using relative URIs in its redirects
by default. To avoid any problems that this behaviour change may
causes we override the default and configure Tomcat to continue to
use absolute URIs.

Closes gh-4715
2015-12-09 11:55:07 +00:00
Andy Wilkinson
b10b7a883d Upgrade to Spring Security 3.2.9.RELEASE
Closes gh-4721
2015-12-09 11:24:12 +00:00
Andy Wilkinson
85bb1780d8 Upgrade to Spring Web Services 2.2.3.RELEASE
Closes gh-4720
2015-12-09 11:24:12 +00:00
Andy Wilkinson
bb9e1be72c Upgrade to Spring Integration 4.1.7.RELEASE
Closes gh-4719
2015-12-09 11:24:12 +00:00
Andy Wilkinson
e50357d907 Upgrade to Spring Loaded 1.2.5.RELEASE
Closes gh-4718
2015-12-09 11:24:12 +00:00
Andy Wilkinson
e54f9063a8 Upgrade to SLF4J 1.7.13
Closes gh-4717
2015-12-09 11:24:11 +00:00
Andy Wilkinson
70ead7113d Upgrade to Jetty 9.2.14.v20151106
Closes gh-4716
2015-12-09 11:24:11 +00:00
Andy Wilkinson
349794f9cf Upgrade to mysql-connector-java 5.1.38
Closes gh-4714
2015-12-09 10:40:01 +00:00
Andy Wilkinson
8feaf1e92c Upgrade to Undertow 1.1.9.Final
Closes gh-4713
2015-12-09 10:39:22 +00:00
Andy Wilkinson
00b668b2c5 Only clean up logging system when root application context is closed
Previously, LoggingApplicationListener would clean up the logging
system in response to any application context with which it was
registered being closed. This caused problems when a child context was
closed. Specifically, closing the child context would cause any
SLF4J-based logging systems to unregister the JUL bridge handler
preventing an JUL logging being bridged into Logback or Log4J2.

This commit updates LoggingApplicationListener so that the logging
system is only cleaned up when a root application context is
closed.

Closes gh-4651
2015-12-03 14:01:32 +00:00
Ivan Chen
d6bd120b2c Remove unused test.css from spring-boot-sample-tomcat
Closes gh-4606
2015-12-03 11:10:15 +00:00
Vladimir Tsanev
939b66f4ee Use fast exceptions in findResource(s)
Some libraries like aspectj are using findResource to see the raw
bytecode of a class. It will even call findResource for every method of
every class of beans that are post processed. This can be significant
performance hit on startup when LaunchedURLClassLoader and there are a
lot of nested jars.

See gh-3640
Fixes gh-4557
2015-12-03 09:57:30 +00:00
Andy Wilkinson
0214fe4b82 Remove inconsistent synchronization from EmbeddedWebApplicationContext
Previously, EmbeddedWebApplicationContext used synchronized, but did
not do so consistently. It also synchronized on this so its lock was
exposed outside of the class, creating a risk of deadlock if a caller
synchronized incorrectly. Furthermore, not all fields on the class
were sychronized so the class wasn't truly thread-safe.

This commit attempts to rectify some of the problems above. The use
of synchronized has been dropped in favour of using a volatile field
for the embedded servlet container. Whenever this field is accessed,
a local variable is used to "cache" the value thereby preventing a
change on another thread from causing unwanted behaviour such as an
NPE.

Closes gh-4593
2015-12-01 14:55:53 +00:00
Stephane Nicoll
9bffdc80ff Upgrade to Spring Framework 4.1.9.BUILD-SNAPSHOT 2015-11-29 17:26:57 +01:00
Stephane Nicoll
1ab05326a9 Upgrade to Spring Social 1.1.4.RELEASE 2015-11-27 15:33:10 +01:00
Dave Syer
7d04ca1e1b Add tests to assert behaviour of actuator endpoints with context path
See gh-4401
2015-11-27 10:56:04 +00:00
Stephane Nicoll
ae13082e0d Generate meta-data for nested Lombok types
Closes gh-4397
2015-11-26 20:23:24 +01:00