Commit Graph

10971 Commits

Author SHA1 Message Date
Phillip Webb
cfbac20807 Ensure ErrorControllers work when using AOP
Add a BeanFactoryPostProcessor to set PRESERVE_TARGET_CLASS_ATTRIBUTE
to true on all ErrorController bean definitions. Without this attribute
AOP advice on @Controllers causes ErrorController beans to be created
as JDK proxies (since they implement a single valid looking interface)
and therefore not get found by Spring MVC.

Fixes gh-4236
2015-10-20 13:42:38 -07:00
Stephane Nicoll
6a18fa072f Fix import ordering 2015-10-20 21:25:50 +02:00
Dave Syer
90ddd857f4 Add support for binding to Properties in @ConfigurationProperties
Fixes gh-4250
2015-10-20 15:11:21 -04:00
Andy Wilkinson
b76414002a Merge branch '1.2.x' 2015-10-20 18:19:51 +01:00
Andy Wilkinson
ee93307402 Align the mime mapping configuration across all three embedded containers
Closes gh-4161
2015-10-20 17:46:01 +01:00
Andy Wilkinson
0862ad7f52 Polishing: remove dead code 2015-10-20 15:28:52 +01:00
Andy Wilkinson
2109559f37 Ensure that, where appropriate, actuator endpoints always produce JSON
Previously, the Actuator’s endpoints did not specify a produces
attribute on their request mappings. With Jackson’s XML binding on the
classpath, this would lead to requests made by a browser receiving
application/xml responses (due to the Accept header indicating that
application/xml is preferred). This was problematic as some of the
response payloads were not legal xml. Problems included XML tags
beginning with ‘\’ or containing ‘#’.

This commit updates the endpoints to specify that they produce
application/json. The environment and metrics endpoints have also been
updated so that always return a JSON object, even when they are
returning a single entry. This consistency avoids problems where
clients may not consider a single scalar value to be legal JSON.

Closes gh-2449
2015-10-20 15:28:52 +01:00
Stephane Nicoll
cc3b7ca6f6 Add missing configuration keys for groovy template 2015-10-20 15:46:09 +02:00
Stephane Nicoll
4ae6d7c97e Remove outdated key
See gh-3696
2015-10-20 15:35:03 +02:00
Stephane Nicoll
eb2650976f Fix typo 2015-10-20 15:30:07 +02:00
Stephane Nicoll
168fc2f61f Disable addResources by default
Flip the default value of `addResources` for both the Maven and Gradle
plugins. This effectively turns off static resources reloading and, more
importantly, the pruning of duplicate resources from the target
directory.

As devetools is our mainstram solution for such feature, the documantion
has been updated to reflect that.

Closes gh-4227
2015-10-20 15:04:25 +02:00
Andy Wilkinson
d071db8cc9 Align launch.script with the init script spec
The init script spec [1] describes a number of requirements with which
our launch.script did not comply. This commit makes the following
corrections:

 - Add support for force-reload which should be implemented by all
   init scripts
 - Don't fail restart if the service is already stopped or not running
 - Consider stop to be successful if the service is already stopped
 - Exit with 1 if stop fails (indicating a generic or unspecified error)
   rather than 3 (unimplemented feature)
 - Report a status of 1 if app is not running but the pid file exists
 - Report a status of 3 if the app is not running (no pid file)

Closes gh-4231

[1] http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
2015-10-20 11:27:43 +01:00
Stephane Nicoll
1d3386ba3f Remove spring-boot-dependency-tools
A merge from 1.2.x brought back this module that was deleted on master.

Closes gh-4246
2015-10-20 11:50:29 +02:00
Stephane Nicoll
82430b4725 Merge pull request #4202 from eddumelendez/gh-4201
* pr/4202:
  Polish contribution
  Add spring.jersey.path property
2015-10-20 11:35:46 +02:00
Stephane Nicoll
bc0eb996ff Polish contribution
Closes gh-4202
2015-10-20 11:35:35 +02:00
Eddú Meléndez
396cf76ef5 Add spring.jersey.path property
Provide a property to customize the application path that serves as the
base URI for a JAX-RS compliant application. If both `spring.jersey.path`
and an `@ApplicationPath` are present, the property takes precedence.

Closes gh-4201
2015-10-20 10:55:43 +02:00
Stephane Nicoll
d554aa34b6 Merge pull request #4241 from izeye/trace
* pr/4241:
  Remove unused property in TraceProperties
2015-10-20 09:12:40 +02:00
Johnny Lim
f67b6a233a Remove unused property in TraceProperties
Closes gh-4241
2015-10-20 09:11:51 +02:00
Stephane Nicoll
fc55d8b7a6 Merge pull request #4243 from izeye/patch-43
* pr/4243:
  Fix broken link
2015-10-20 09:10:55 +02:00
Johnny Lim
330073ed17 Fix broken link
Closes gh-4243
2015-10-20 09:10:27 +02:00
Phillip Webb
89fe0794a9 Switch RequestContextListener to Filter
Update WebMvcAutoConfiguration to use a RequestContextFilter instead of
a RequestContextListener.

Using a filter is required for some Spring Session operations (see
https://github.com/spring-projects/spring-session/issues/129).

This update also has the added benefit of allowing the Response to be
accessed from RequestContextHolder.getRequestAttributes() by casting it
to ServletRequestAttributes.

Fixes gh-2637
2015-10-19 16:05:37 -07:00
Phillip Webb
90f7bc0321 Polish 2015-10-19 13:04:06 -07:00
Phillip Webb
cf68f83ef6 Update checkstyle import order rules
See gh-4234
2015-10-19 13:03:02 -07:00
Phillip Webb
634bb770b2 Organize imports with new settings
See gh-4234
2015-10-19 12:58:34 -07:00
Phillip Webb
1e4d974ec0 Merge remote-tracking branch 'local12x/1.2.x' 2015-10-19 12:56:55 -07:00
Phillip Webb
a79131f8d2 Organize imports with new settings
See gh-4234
2015-10-19 12:55:44 -07:00
Phillip Webb
47ae7487ac Tweak import order settings
Update the import order settings to be a little more logical. Imports
should now be ordered:

java.*
javax.*
<others>
org.springframework.*
import static *

See gh-4234
2015-10-19 12:17:46 -07:00
Andy Wilkinson
5080e2d71f Merge branch '1.2.x' 2015-10-19 19:09:02 +01:00
Andy Wilkinson
92ba46e1c9 Upgrade to Spring Social Twitter 1.1.2.RELEASE
Closes gh-4238
2015-10-19 19:08:29 +01:00
Stephane Nicoll
4f3025e17c Merge branch '1.2.x' 2015-10-19 15:09:56 +02:00
Stephane Nicoll
a4af835c35 Merge pull request #4212 from zhanhb/patch-4
* pr/4212:
  Fix default value of MongoDB port in doc
2015-10-19 15:09:41 +02:00
zhanhb
299d0653ed Fix default value of MongoDB port in doc
Closes gh-4212
2015-10-19 15:08:43 +02:00
Stephane Nicoll
f34a627145 Merge pull request #4207 from shakuzen/patch-7
* pr/4207:
  Upgrade maven-resources-plugin 2.7
2015-10-19 15:06:20 +02:00
Tommy Ludwig
77bdc2dc26 Upgrade maven-resources-plugin 2.7
Closes gh-4207
2015-10-19 14:45:15 +02:00
Stephane Nicoll
aeec1713eb Fix checkstyle violations 2015-10-19 14:42:11 +02:00
Stephane Nicoll
32b32b7142 Notify the use of logback specific system property
Logback documentation explains how to initialize the logging system and
namely how the `logback.configurationFile` system property can be used to
specify the configuration file to use.

Spring Boot has an abstraction on top of that. A user can define the
`logging.path` property regardless of the logging infrastructure it is
using.

Users following the logback documentation can be confused at first so
we're not logging a warning when we found out that the logback specific
property has been specified.

Closes gh-2382
2015-10-19 14:37:12 +02:00
Tommy Ludwig
e4230e61d7 Make the name of the log file produced by launch script configurable
Previously, the launch script would always use a file named
<appname>.log to capture the application's console output. This commit
adds a variable, LOG_FILENAME, for specifying the file name defaulting
to <appname>.log.

Fixes gh-4194
2015-10-19 11:38:22 +01:00
Stephane Nicoll
fd525077bd Improve HornetQ/Artemis embedded tests
Previously, HornetQ and Artemis tests were using a test configuration
class listing the configuration classes to use explicitly in the purpose
of disabling the XA support.

This had a very unfortunate side effect for Artemis as we forgot to add
an import on the "real" configuration and this got unnoticed because of
this duplication.

It turns out that this special configuration class is no longer necessary
as XA backs off automatically anyway now. The tests have been updated
to use the regular auto-configuration and were failing with Artemis. The
import has now be added.

Closes gh-4226
2015-10-19 11:46:15 +02:00
Huang YunKun
e72b14cb5f Upgrade to ActiveMQ 5.12.1
Closes gh-4219
2015-10-19 10:14:36 +01:00
Stephane Nicoll
f929af32d6 Merge pull request #4222 from izeye/patch-42
* pr/4222:
  Remove unnecessary statement
2015-10-18 09:25:38 +02:00
Johnny Lim
cfaf813da8 Remove unnecessary statement
Closes gh-4222
2015-10-18 09:25:19 +02:00
Stephane Nicoll
8ad020249e Merge pull request #4225 from marc0der/master
* pr/4225:
  Update all GVM references to SDKMAN!
2015-10-18 09:21:16 +02:00
Marco Vermeulen
673bde0bf7 Update all GVM references to SDKMAN!
Closes gh-4225
2015-10-18 09:20:57 +02:00
Stephane Nicoll
8db39140d4 Merge branch '1.2.x' 2015-10-16 15:37:53 +02:00
Spring Buildmaster
2b38a861e3 Next Development Version 2015-10-16 05:57:24 -07:00
Andy Wilkinson
ac944f02cc Use a random HTTP port when running SampleLiquibaseApplicationTests 2015-10-16 12:07:56 +01:00
Andy Wilkinson
56977c037d Merge branch '1.2.x' 2015-10-16 11:19:14 +01:00
Andy Wilkinson
c236db04ef Ignore parent contexts in message source auto-configuration
This commit applies the changes made in 68b55ad to 1.2.x (it was
originally only made in 1.0.x and master). It also adds some tests.

Closes gh-3803
2015-10-16 11:07:39 +01:00
Andy Wilkinson
f8cffd745c Merge branch '1.2.x' 2015-10-16 10:42:26 +01:00
Andy Wilkinson
874cd3390e Fix version of parent in pom for spring-boot-sample-war 2015-10-16 10:39:58 +01:00