Commit Graph

535 Commits

Author SHA1 Message Date
Stephane Nicoll
bb736e255b Fix SNAPSHOT version 2015-12-17 14:15:14 +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
Ivan Chen
d6bd120b2c Remove unused test.css from spring-boot-sample-tomcat
Closes gh-4606
2015-12-03 11:10:15 +00:00
Stephane Nicoll
791e3048cf Fixup version numbers following release 2015-11-01 17:02:35 +01:00
Andy Wilkinson
1f92360583 Ensure that HATEOAS sample does not try to produce XML
The HATEOAS sample does not support XML responses. Previously, the
controller doesn't constrain the media types that it could produce.
This would result in a failure when handling a request that prefers
XML responses.

This commit updates the produces clauses in the controller so that
the sample will only attempt to produce JSON.

Closes gh-4343
2015-10-30 09:17:34 +00:00
Andy Wilkinson
05b501ce41 Update Tomcat multi-connectors sample to configure SSL declaratively
The documentation recommends configuring the HTTP connector in code
and using application.properties to configure the HTTPS connector
as it's easier. This commit updates the sample to follow that
recommendation.

Closes gh-4342
2015-10-30 09:05:24 +00:00
Phillip Webb
a79131f8d2 Organize imports with new settings
See gh-4234
2015-10-19 12:55:44 -07:00
Spring Buildmaster
2b38a861e3 Next Development Version 2015-10-16 05:57:24 -07:00
Phillip Webb
d84889b03c Revert "Compile samples and integration tests with Java 8"
This reverts commit 09395f956a.
2015-10-16 00:01:52 -07:00
Phillip Webb
56643222cf Add simple war sample 2015-10-15 15:31:28 -07:00
Andy Wilkinson
d33d068fae Upgrade to Tomcat 8.0.28 and test support for SSL config from classpath
Prior to 8.0.28 Tomcat required the key store and trust store (if any)
to be available directly on the filesystem, i.e. classpath: resources
would not work. Tomcat 8.0.28 removed this limitation.

This commit updates to Tomcat 8.0.28, updates the tests to verify
the new Tomcat capability and removes the obsolete documentation of
the restriction.

Closes gh-4048
2015-10-12 13:36:32 +01:00
Phillip Webb
6ab376e2e8 Reformat code use Eclipse Mars 2015-10-07 23:32:31 -07:00
Phillip Webb
09395f956a Compile samples and integration tests with Java 8
Update the samples and integration tests to use Java 8. There's no
specific reason to keep them on Java 6 and it helps keep Eclipse happy
if we upgrade.
2015-10-07 19:46:11 -07:00
Phillip Webb
d22d0683b2 Fixup build following release 2015-09-16 12:03:23 -04:00
Spring Buildmaster
9409c49c10 Next development version 2015-09-16 09:00:17 -07:00
Phillip Webb
5f250ebbc1 Add exception endpoints to tomcat-jsp sample
Update `spring-boot-sample-tomcat-jsp` to include endpoints that trigger
exceptions. Primarily to aid testing of the ErrorPageFilter.

See gh-2745
2015-09-11 12:25:48 -07:00
Phillip Webb
15686ed4fd Reformat code 2015-09-08 14:07:06 -07:00
Phillip Webb
0f6b60d8c8 Organize imports 2015-09-08 14:05:00 -07:00
Phillip Webb
feb2452f06 Simplify WebApplicationContext class guard
See gh-3856
2015-09-03 10:33:53 -07:00
Thomas Traude
2b6d7a3f15 Update URL to Groovy Docs
Closes gh-3715
2015-08-09 09:03:54 +02:00
Dave Syer
d0cf6b534b Add 3xx redirects to the "unmapped" class of requests for metrics
When Spring Security sends 302 responses to a login page we don't get
any information about the request matching in Spring MVC. Consequently
apps can end up with a lot of counter.status.302.* metrics (where
"*" can be whatever the user sent).

This change treats 3xx the same as 4xx (if it is unmapped it just gets
added to a metric called "unmapped" instead of using the actual request
path).

Fixes gh-2563
2015-07-13 13:33:30 +01:00
Phillip Webb
43dc0c64c2 Fixup version numbers following release 2015-07-01 23:22:34 -07:00
Spring Buildmaster
7ce391db4f Next development version 2015-07-01 22:48:01 -07:00
Matt Benson
183a2095f4 Fixup sample Ant build
Fixes gh-3324
2015-06-30 00:54:53 -07:00
Stephane Nicoll
b847b6fa4b Fixup version numbers following release 2015-06-04 10:34:44 +02:00
Spring Buildmaster
5d81c87b43 Next Development Version 2015-06-04 00:49:11 -07:00
Phillip Webb
968b68c322 Polish 2015-06-02 11:17:16 -07:00
Andy Wilkinson
dabbb02dfe Prevents tests that use Elasticsearch from polluting the filesystem
By default, Elasticsearch writes it data to ./data. This led to data
being left on the filesystem after a mvn clean which could cause
failures when moving between branches that use different versions of
Elasticsearch.

This commit updates the tests for the Elasticsearch sample and
the Elasticsearch auto-configuration classes to write the
Elasticsearch data and logs into the target directory.
2015-04-21 14:53:43 +01:00
Phillip Webb
42e69359a8 Fixup version numbers following release 2015-03-30 23:25:03 -07:00
Spring Buildmaster
e03c11dda8 Next development version 2015-03-30 22:56:20 -07:00
Dave Syer
c153c4e517 Make tomcat provided in a war sample 2015-03-17 16:28:22 +00:00
Phillip Webb
0174476ff1 Merge branch '1.1.x' into 1.2.x 2015-03-02 12:12:57 -08:00
Phillip Webb
50e1f80581 Remove .factorypath files 2015-03-02 12:12:06 -08:00
Phillip Webb
561ed99b5b Merge branch '1.1.x' into 1.2.x 2015-03-02 12:09:24 -08:00
Phillip Webb
8ce39bda88 Fixup version numbers following release 2015-02-26 15:59:57 -08:00
Spring Buildmaster
8f0ad02237 Next development version 2015-02-26 15:26:53 -08:00
Phillip Webb
8a49218e82 Fixup version numbers following release 2015-02-26 14:17:25 -08:00
Spring Buildmaster
aea68f0c32 Next development version 2015-02-26 13:01:31 -08:00
Phillip Webb
a1cbd93d6b Ensure local Elasticsearch nodes are closed
Update ElasticsearchAutoConfiguration to ensure that local nodes are
closed when the context is closed. Prior to this commit the close()
method of the Client would be called which had no effect for local
Nodes.

Fixes gh-2480
2015-02-24 14:18:51 -08:00
Phillip Webb
4cac9d7382 Ensure actuator works without Spring MVC
Update MetricFilterAutoConfiguration to ensure that it is only applied
if Spring MVC is on the classpath.

Fixes gh-2542
2015-02-24 13:08:42 -08:00
Phillip Webb
8e594c790e Fix eclipse errors and warnings
Fix some eclipse errors and warnings caused by XSD validation errors and
classes in the wrong place.
2015-02-24 12:44:19 -08:00
Andy Wilkinson
17fd3d44b7 Add workaround for Undertow WebSocket client sending illegal Origin
Undertow’s WebSocket client sends an illegal Origin header – it does
not include the scheme, e.g. it’ll send “localhost” rather than
“http://localhost”. This commit works around the problem by allowing
access to the SockJS endpoints from any origin, thereby disabling
OriginHandlerInterceptor’s checking of the Origin header.
2015-02-19 14:30:23 +00:00
Andy Wilkinson
d87bf707a7 Merge branch '1.1.x' 2015-02-17 10:01:39 +00:00
Phillip Webb
636898f9ad Polish 2015-02-09 11:39:48 -08:00
Stephane Nicoll
dfdb801533 Fix use of deprecated API. 2015-02-02 11:34:49 +01:00
Andy Wilkinson
c9186c45a2 Merge branch '1.1.x' 2015-01-29 13:39:16 +00:00
Andy Wilkinson
c346e996ed Ignore temporary .writing files when finding output files
Spring Integration's FileWritingMessageHandler uses a .writing file
while it's in the process of writing a message to disk and then
performs a rename (depending on the OS and filesystem this may or may
not be atommic) to create the .msg file. Prior to this commit the
test was finding the temporary .writing files and examining them. This
could lead to a FileNotFoundException being thrown as the temporary
file was deleted while the test was trying to read its contents.

This commit updates the test to only look for files with a .msg suffix

Fixes gh-2428
2015-01-29 13:32:01 +00:00
Andy Wilkinson
8e8bf8e177 Uses the latest version of Tomcat 7 in the sample 2015-01-26 14:38:30 +00:00
Andy Wilkinson
01344c8617 Add a starter for building a RESTful service with Spring HATEOAS
Closes gh-2396
2015-01-22 15:22:50 +00:00
Andy Wilkinson
f0421801fb Update spring-boot-sample-tomcat-jsp to use Tomcat 8
Closes gh-2394
2015-01-22 11:09:19 +00:00