531 Commits

Author SHA1 Message Date
Phillip Webb
e07df7e4c6 Remove redundant modifiers 2015-09-08 17:01:30 -07:00
Phillip Webb
d09805fd75 Polish license headers 2015-09-08 16:05:05 -07:00
Phillip Webb
6e29ee4557 Polish 2015-09-08 16:04:30 -07:00
Phillip Webb
67402405db Reformat code 2015-09-08 14:56:40 -07:00
Phillip Webb
2615990ffb Organize imports 2015-09-08 14:40:35 -07:00
Phillip Webb
0335053139 Merge branch '1.2.x' 2015-09-08 14:37:16 -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
690da89c82 Fix warnings 2015-09-05 00:21:09 -07:00
Phillip Webb
6193b640a4 Polish 2015-09-02 23:44:19 -07:00
Stephane Nicoll
6f3cc712bf Merge branch '1.2.x' 2015-08-20 14:48:31 +02:00
Stephane Nicoll
6869b0d987 Fix wrong imports on StringUtils
Closes gh-3792
2015-08-20 14:46:20 +02:00
Stephane Nicoll
7c0c953f81 Add value alias for SpringApplicationConfiguration
Given that Spring Boot uses java config accross the board, a new `value`
attribute is now aliased to the existing `classes` attribute such that
one could write the following:

@SpringApplicationConfiguration(MyConfig.class)
public class MyTest {}

Closes gh-3635
2015-08-19 17:09:34 +02:00
Stephane Nicoll
73ee6652fd Use project location to infer the artifactId
On start.spring.io, if you customize the artifactId it creates a zip file
with the same name. The `spring init` command did not have a similar
shortcut.

This commit updates the request to customize the artifactId if none is
set and a custom location was specified. Just as we check for the
presence of a dot to figure out if we have to extract the archive or not,
we check for it to generate an artifactId without an extension.

In practice, `spring init foo` creates a foo directory with a project
whose artifactId is `foo` and `spring init foo.zip` stores a foo.zip
file with the same project (i.e. the artifactId is `foo`).

Closes gh-3714
2015-08-14 17:10:21 +02:00
Stephane Nicoll
04b1de2d1d Add package-name option for spring init
For some reason, we forgot to add an attribute to customize the package
name when using spring init. This is now the case.

Closes gh-3716
2015-08-10 14:32:50 +02:00
Stephane Nicoll
42e230192f Polish 2015-07-24 07:19:53 +02:00
Phillip Webb
f0f5f78e25 Polish 2015-07-14 22:17:52 -07:00
Andy Wilkinson
5e4a450030 Gracefully handle profiles in settings.xml with no <activation>
See gh-3483
2015-07-14 14:05:04 +01:00
Andy Wilkinson
eb5c195c23 Add settings.xml that was missed in 84937551 2015-07-14 13:07:07 +01:00
Andy Wilkinson
8493755178 Configure CLI with repositories from active profiles in settings.xml
This commit enhances the CLI to use the repositories configured in the
profiles declared in a user's Maven settings.xml file during
dependency resolution. A profile must be active for its repositories
to be used.

Closes gh-2703
Closes gh-3483
2015-07-14 12:30:18 +01:00
Dave Syer
f6c395d0a6 Add Maven incantation to make STS 3.7 happy 2015-07-13 14:00:44 +01:00
Phillip Webb
ee3de5f38a Add ApplicationRunner support to CLI
Add ApplicationRunner and ApplicationArguments to the CLI compiler
auto-configuration.

See gh-1990
2015-07-10 13:51:57 -07:00
Dave Syer
924b9f9dde Add Maven incantation to make STS 3.7 happy 2015-07-10 15:56:40 +01:00
Stephane Nicoll
97634e85ac Remove unnecessary keyword 2015-07-09 14:33:01 +02:00
Stephane Nicoll
a073a505ae Move spring.oauth2.* to security.oauth2.*
Unfortunately, we have no other choice to flip the ignoreUnknownFields
attribute of `SecurityProperties` has many different target are now set
for that namespace outside the class. See gh-3445 for a potential way
to improve that.

Closes gh-3327
2015-07-08 18:26:25 +02:00
Spring Buildmaster
7ce391db4f Next development version 2015-07-01 22:48:01 -07:00
Phillip Webb
61fc4f3f12 Polish copyright headers 2015-06-23 10:22:14 -07:00
Stephane Nicoll
2ff9299bcf Fix typo 2015-06-19 15:53:17 +02:00
Phillip Webb
fffc6f5dd2 Merge branch '1.2.x' 2015-06-18 12:52:56 -07:00
Phillip Webb
1e40bff174 Polish 2015-06-18 12:52:41 -07:00
Andy Wilkinson
c60d65823b Merge branch '1.2.x' 2015-06-18 17:02:49 +01:00
Andy Wilkinson
7d80f0efea Update tests so that they also work on Windows
See gh-3274
2015-06-18 17:01:09 +01:00
Andy Wilkinson
a6a8d0b221 Merge branch '1.2.x' 2015-06-18 13:31:29 +01:00
Andy Wilkinson
af067ae28b Add files that were accidentally omitted from 5e743fb2
See gh-3274
2015-06-18 13:30:20 +01:00
Andy Wilkinson
77f303b42c Merge branch '1.2.x' 2015-06-18 12:38:33 +01:00
Andy Wilkinson
5e743fb299 Fully honour local repository location configured in settings.xml
Previously, DefaultRepositorySystemSessionAutoConfiguration would
read the local repository configuration from settings.xml, but did
not perform any property interpolation. This would leave placeholders
such as ${user.home} as-is and result in the use of the wrong
location. To address this, the code that reads settings.xml has been
updated to provide the current System properties as a property
interpolation source.

RepositoryConfigurationFactory configures the local repository as a
"remote" repository when the local repository location has been
overridden. This allows spring grab to copy dependencies from the
local repository into the grab output location (configured via the
grape.root system property) rather than having to download them again.
This logic did not consider the customization of the local repository
location via settings.xml so the dependencies would be downloaded again.
To address this, RepositoryConfigurationFactory has been updated to
attempt to use the location configured in settings.xml, before falling
back to the default location.

The logic that reads settings.xml has deliberately been duplicated. It
could have been extracted into a separate class, but this is only a
temporary measure until gh-3275 is tackled. Duplication was deemed
preferable to adding a new public class in 1.2.x that we’d then want to
remove in 1.3.

Closes gh-3274
2015-06-18 12:37:19 +01:00
Phillip Webb
49039c33ea Polish 2015-06-15 11:44:44 -07:00
Dave Syer
2c829c7229 Add support for Spring Retry in CLI 2015-06-12 14:55:07 +01:00
Andy Wilkinson
5defa42436 Update AetherGrapeEngineTests to only use milestone repo when needed
Closes gh-3051
2015-06-10 16:19:07 +01:00
Phillip Webb
5312be4a25 Fix CLI package tangle
Remove explicit TestFailedException catch in CommandRunner and instead
rely on the fact that TestFailedException extends CommandException.

Fixes gh-3167
2015-06-09 16:41:20 -07:00
Phillip Webb
7609c43685 Switch Javadoc <code>...</code> to {@code ...}
Update Javadoc to use the {@code ...} syntax when possible.
2015-06-05 10:10:34 -07:00
Eddú Meléndez
baca62a6c0 Fix typos 2015-06-05 16:59:51 +02:00
Phillip Webb
09a29a7207 Polish OAuth SSO 2015-06-04 00:56:12 -07:00
Phillip Webb
412b7b9e50 Polish 2015-06-04 00:55:30 -07:00
Spring Buildmaster
5d81c87b43 Next Development Version 2015-06-04 00:49:11 -07:00
Phillip Webb
49c4710f63 Merge branch '1.2.x' 2015-06-02 12:32:46 -07:00
Phillip Webb
968b68c322 Polish 2015-06-02 11:17:16 -07:00
Stephane Nicoll
b838513fda Upgrade to Spring Framework 4.2.0.RC1
Closes gh-2947
2015-05-27 15:31:10 +02:00
Dave Syer
c5dc3f564b Add @EnableOAuth2Sso and spring.oauth2.sso.*
User can enable OAuth2 SSO by declaring the intent (@EnableOAuth2Sso)
and also configuring the client properties (spring.oauth2.client.*).
The spring.oauth2.sso.* are only needed to change the path for the
login (defaults to /login) - any other security configuration for the
protected resources can be added in a WebSecurityConfigurerAdapter
which carries the @EnableOAuth2Sso annotation.
2015-05-26 07:23:26 +01:00
Greg Turnquist
53f67a448f Auto-configure Spring Security OAuth2 when detected on the classpath
* Automatically spin up Authorization Server and Resource Server
* Automatically configures method level security included OAuth2Expression handler
* Wrote extensive unit tests verifying default behavior as well as the auto-configuration backing off when custom Authorization/Resource servers are included
* Created org.springframework.boot.security.oauth2 subpackage to contain it
* Can also disable either resource of authorization server completely with a single property for each
* Print out the auto-generated secrets and other settings
* Added spring-boot-sample-secure-oauth2 to provide a sample that can be run and poked with curl as well as some automated tests.
* Make users ask for which servers to install by adding @Enable*
* User has to @EnableGlobalMethodSecurity instead of using properties files

Add Spring Security OAuth2 support to Spring Boot CLI

* Triggered from either @EnableAuthorizationServer or @EnableResourceServer
* Needs to have @EnableGlobalMethodSecurity to allow picking the annotation model.
* By default, comes with import support for @PreAuthorize, @PreFilter, @PostAuthorize, and @PostFilter via a single start import
* Also need import support for the enable annotations mentioned above.
* Added extra test case and sample (oauth2.groovy)
2015-05-26 06:34:43 +01:00