Commit Graph

687 Commits

Author SHA1 Message Date
Stephane Nicoll
e19d9ff09d Fix gradle config for the bootRun task
Closes gh-4627
2015-11-27 10:23:12 +01:00
Johnny Lim
8ec00c35bf Polish
Closes gh-4572
2015-11-21 08:12:21 +01:00
Stephane Nicoll
14e7b10310 Fixup version numbers following release 2015-11-16 12:50:27 +01:00
Spring Buildmaster
3f6f57a80e Next Development Version 2015-11-16 03:18:54 -08:00
Johnny Lim
4d9111606b Polish docs
Closes gh-4446
2015-11-12 17:23:04 +01:00
Dave Syer
88f776ef17 Remove duplicate sample 2015-11-07 10:25:07 +00:00
Phillip Webb
6c2ea4648f Polish 2015-11-03 20:36:20 -08:00
Dave Syer
fa9724becb Revert "Add or avoid proxy configurations for integration tests"
This reverts commit 251f2805a8.
2015-11-02 17:38:54 +00:00
mrumpf
251f2805a8 Add or avoid proxy configurations for integration tests
The Maven POM does all the dependency resolutions for the
spring-boot-antlib project. Delegating this task to Ivy, which is
buried deep in the Antrun/Antunit part of the build, makes any kind
of proxy configuration much more complex.
The ivysettings.xml already has the local M2 repository configured,
but because the folder "repository" is missing, the artifacts, already
downloaded by Maven cannot be resolved from this location.
The Spring and Maven Central repositories should be removed from the
ivysettings.xml files in order to force all resolves to be done through
the local M2 repository. The POM of joda-time version 2.8.1 has an
optional dependency to joda-convert 1.2, which lets the Ivy resolve
process fail, because this version of the joda-convert library was
not resolved by any of the Maven POMs. It seems as if Ivy does not
respect the optional scope, defined in the joda-time POM.

Pass proxy settings to the forked process to make the Gradle distribution download work

Create a gradle.properties file for each Gradle integration test and writes the forking
process' proxy settings as systemProp.http(s).Host/Port to the properties file.
This configures the external process with the right proxy settings to let it download
the Gradle distribution via the HTTP proxy server.

Added a hint for Windows users to get the core.autocrlf setting right

When the core.autocrlf setting under Windows is set to false for example
All files are not converted regarding their EOL characters to the
Windows format with CRLF at a line's end. There is a checkstyle
validation that checks that all files have the system's line endings
and in some test-cases the value from the system property "line.ending"
is used to check test output. So without the conversion, those checks
are going to fail, resulting in build errors.

Fixes gh-4367, fixes gh-3816
2015-11-02 17:23:30 +00:00
Dave Syer
cc3f673874 Narrow range of events listened for in security audit
The InteractiveAuthenticationSuccessEvent is always shadowed by a
regulat AuthenticationSuccessEvent, so there's no need to listen for
all AbstractAuthenticationSuccessEvents.

Fixes gh-4355
2015-11-02 10:01:45 +00:00
Dave Syer
96fcd49e2e OpenTsdbMetricWriter -> OpenTsdbGaugeWriter 2015-10-31 16:10:49 +00:00
Dave Syer
db03e8ea50 Fix sample and tidy up MetricWriter/GaugeWriter
The metric export configuration was still using the MetricWriter
interface where it should be using GaugeWriter
2015-10-31 16:00:48 +00:00
Andy Wilkinson
74317a220e Merge branch '1.2.x' 2015-10-30 09:24:14 +00: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
248fcbec5d Merge branch '1.2.x' 2015-10-30 09:06:58 +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
Dave Syer
abd7bc0466 Add OAuth2 resource server sample
Shows how to use @EnableResourceServer in a pure resource
server and configure the secure paths.
2015-10-29 08:41:51 +00:00
Andy Wilkinson
c4122b8f8d Work around brittle annotation scanning in Mojarra
FacesListener in Mojarra 2.2.12 (used in Glassfish 4.1.1) is a
ServletContainerInitializer that’s annotated to handle types annotated
with javax.annotation.Resource.
OAuth2RestOperationsConfiguration.SessionScopedConfiguration is one such
class. This leads to com.sun.faces.config.DelegatingAnnotationProvider
calling getAnnotations on SessionScopedConfiguration.class. This fails
with a java.lang.ArrayStoreException due to SessionScopedConfiguration
being annotated with @ConditionalOnBean(OAuth2ClientConfiguration) and
OAuth2ClientConfiguration not being on the classpath.
DelegatingAnnotationProvider currently catches NoClassDefFoundErrors
thrown during its annotation processing. It needs to be made more
robust so that it also copes with an ArrayStoreException, in a similar
way to how org.glassfish.apf.impl.AnnotationProcessorImpl was updated to
fix GLASSFISH-21265 [1]. I’ve opened an issue to this effect [2].

In the meantime, we can work around the brittleness in
DelegatingAnnotationProvider by restructuring
SessionScopedConfiguration. This commit moves the use of @Resource into
a nested inner class, ClientContextConfiguration, while leaving the use
of @ConditionalOnBean on SessionScopedConfiguration. This means that it
is now ClientContextConfiguration that is passed to FacesListener and
processed by DelegatingAnnotationProcessor, thereby avoiding exposing
it to the @ConditionalOnBean annotation that it does not handle
gracefully. A Glassfish-based deployment test has also been added to
verify the fix.

Closes gh-2079
Closes gh-4321

[1] https://java.net/jira/browse/GLASSFISH-21265
[2] https://java.net/jira/browse/JAVASERVERFACES-4076
2015-10-28 12:18:22 +00:00
Huang YunKun
1c5e445554 Update the samples to use @WebIntegrationTest and randomPort=true
Closes gh-4294
Closes gh-4271
2015-10-27 11:56:01 +00:00
Andy Wilkinson
d9d4cc2ef5 Ensure request context is setup before security filter runs
Previously, OrderedRequestContextFilter was ordered such that it
ran after Spring Security's Filter. This meant that the request
context was unavailable to any Filters in Spring Security's Filter
chain. Specifically, this caused a failure when using @EnableOAuth2Sso
as OAuth2ClientAuthenticationProcessingFilter, which is added to
Spring Security's Filter chain would be unable to use the
request-scoped bean upon which it depends.

This commit updates the order of OrderedRequestContextFilter so that
the request context is set up before Spring Security's Filter runs.
The tests for SampleGitHubApplication have been updated to use
TestRestTemplate rather than MockMvc. This is necessary as the latter,
via ServletTestExecutionListener, automatically populates the request
context holder, masking the fact that the request context filter was
setting it up too late.

Closes gh-4270
2015-10-27 10:56:55 +00:00
Andy Wilkinson
89df4946f7 Use a context-relative URL for Dev Tools sample’s CSS 2015-10-26 10:09:50 +00: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
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
874cd3390e Fix version of parent in pom for spring-boot-sample-war 2015-10-16 10:39:58 +01: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
5392c0a52b Merge remote-tracking branch 'springsource/1.2.x' 2015-10-15 21:52:28 -07:00
Phillip Webb
56643222cf Add simple war sample 2015-10-15 15:31:28 -07:00
Wallace Wadge
e3315d2252 Allow TraceWebFilter to trace more attributes
Update TraceWebFilter to optionally trace more details from the
HttpServletRequest/HttpServletResponse. The `management.trace.include`
property can be used to change what aspects are logged.

Closes gh-3948
2015-10-14 13:25:11 -07:00
Andy Wilkinson
995ff66eae Configure m2e to ignore reserve-network-port in Cassandra sample 2015-10-14 13:23:56 +01:00
Stephane Nicoll
01b23c886f Use random port for Cassandra tests
Closes gh-4028
2015-10-14 11:37:19 +02:00
Andy Wilkinson
8ee8c9fe90 Merge branch '1.2.x' 2015-10-12 14:12:20 +01: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
aae38db9af Fix compiler warnings only shown in Eclipse Mars 2015-10-07 23:40:28 -07:00
Phillip Webb
a0fc90a5ec 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 23:40:20 -07:00
Phillip Webb
c9fb9916b8 Reformat code using Eclipse Mars 2015-10-07 23:37:10 -07:00
Phillip Webb
e473364e4e Merge branch '1.2.x' 2015-10-07 23:34:08 -07:00
Phillip Webb
6ab376e2e8 Reformat code use Eclipse Mars 2015-10-07 23:32:31 -07:00
Phillip Webb
47576354f7 Merge branch '1.2.x' 2015-10-07 23:19:50 -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
Andy Wilkinson
cff1eea4c4 Make new configuration inner class static
See gh-4079
2015-10-05 14:35:00 +01:00
Phillip Webb
c3b7764b72 Polish 2015-10-02 11:25:56 -07:00
Andy Wilkinson
2b748a7b44 Fix SampleOAuth2SsoApplicationTests
The redirect happens in two stages, first from / to /login on localhost
and then to github.com. This commit updates the test to check that the
first redirect has worked, i.e. from / to /login on localhost.
2015-10-02 16:55:00 +01:00
Dave Syer
67a70571de Add simple SSO sample with github authentication 2015-10-02 14:13:15 +01:00
Stephane Nicoll
b2c3e7e2ed Rename error.* properties to server.error.*
Closes gh-4050
2015-10-02 14:03:24 +02:00
Dave Syer
c8ec2cb70b Add missing annotation to openTSDB sample 2015-09-28 13:54:50 +01:00
Phillip Webb
31f0c837fd Fix broken Cassandra sample tests
See gh-2064
2015-09-26 01:16:06 -07:00
Julien Dubois
c401330901 Add Cassandra support
Add auto-configuration support and health checks for Cassandra and
Spring Data Cassandra.

Fixes gh-2064
Closes gh-2214
2015-09-25 23:00:53 -07:00