Spring REST Docs 1.2.2.RELEASE

Releases | Andy Wilkinson | September 28, 2017 | ...

It's my pleasure to announce that Spring REST Docs 1.2.2.RELEASE is available from Maven Central, JCenter, and our release repository. My thanks to everyone who contributed to this release by reporting bugs and opening pull requests.

This maintenance release includes a handful of bug fixes and documentation improvements. It is a recommend upgrade for all Spring REST Docs users.

GitHub | Issues | Documentation | Twitter | Gitter | Stack Overflow

Spring Framework 5.0 goes GA

Releases | Juergen Hoeller | September 28, 2017 | ...

Dear Spring community,

It is my pleasure to announce that, after more than a year of milestones and RCs and almost two years of development overall, Spring Framework 5.0 is finally generally available as 5.0.0.RELEASE from repo.spring.io and Maven Central!

This brand-new generation of the framework is ready for 2018 and beyond: with support for JDK 9 and the Java EE 8 API level (e.g. Servlet 4.0), as well as comprehensive integration with Reactor 3.1, JUnit 5, and the Kotlin language. On top of that all, Spring Framework 5 comes with many functional API variants and introduces a dedicated…

Reactor Bismuth is out

Releases | Simon Baslé | September 28, 2017 | ...

It is my great pleasure to announce the GA release of Reactor Bismuth, which notably encompasses reactor-core 3.1.0.RELEASE and reactor-netty 0.7.0.RELEASE ?

With the release of Spring Framework 5.0 now just happening, you can imagine this is a giant step for Project Reactor :)

bismuth crystal

Like the bismuth crystal this release is intricate

 
The release contains a lot of changes and API polishing. For reactor-core you can find the exhaustive list in the release notes.

Important

There is a known (minor) issue with the reactor-core and reactor-test sources jars: They contain duplicate java source entries. See issue #887 for…

Spring AMQP 2.0 Release Candidate 2 Available

Releases | Gary Russell | September 27, 2017 | ...

I am pleased to announce that the 2.0.0.RC2 release candidate of Spring AMQP is now available in the Spring milestone repository.

Since the first release candidate the primary changes are:

  • update to the new 5.0 version of the amqp-client library

  • increase the default prefetch count in listener containers

A complete list of changes since RC1 can be found in the release notes.

Thanks to all the community members for their feedback and contributions!

The GA release will follow shortly after the Spring Framework 5.0 GA release.

For a complete list of changes in 2.0, see What’s New in the reference manual

Spring Cloud Task 1.2.2.RELEASE is now available

Releases | Michael Minella | September 25, 2017 | ...

We are pleased to announce that Spring Cloud Task 1.2.2.RELEASE is now available via Maven Central, Github and the Pivotal download repository. This release adds support for Spring Framework's recent added support for db engines other than MYISAM for the sequence tables when using MySql. A special thanks to Thomas Risberg for the contributions around this issue.

Spring Cloud Task Home | Source on GitHub | Reference Documentation

We look forward to your feedback in Github, StackOverflow, to me directly via Twitter @michaelminella or at SpringOnePlatform in December!

Spring IO Platform Brussels-SR5

Releases | Andy Wilkinson | September 19, 2017 | ...

I am pleased to announce that Spring IO Platform Brussels-SR5 is now available from both repo.spring.io and Maven Central.

This maintenance release upgrades the versions of a number of the projects in the Platform:

  • Spring AMQP 1.7.4
  • Spring Boot 1.5.7
  • Spring Data Ingalls SR7
  • Spring Framework 4.3.11
  • Spring Integration 4.3.12
  • Spring Loaded 1.2.8
  • Spring Web Flow 2.4.6

The versions of a number of third-party dependencies have also been updated.

Project Page | GitHub | Issues | Documentation

Announcing First Release Candidate of Reactor Core 3.1

Releases | Simon Baslé | September 18, 2017 | ...

On behalf of the Reactor team, it is my pleasure to announce that reactor-core 3.1.0.RC1 has been released ?. This is a big last step towards GA release of 3.1 at the end of the month, the long term support version that will back Spring 5!

It is also complemented by various releases, all tied together in the Bismuth-M4 Release Train and BOM:

  • reactor-test, reactor-extra, reactor-adapter and reactor-logback all made the cut to 3.1.0.RC1
  • reactor-netty has seen significant updates and bug fixes in the new 0.7.0.M2 milestone
  • reactor-kafka has been released in its 1.0.0.M4 milestone

In order to get this release, the best way is to use the BOM, as described in the reference guide here. Make sure to read the part about milestones (transposing it to Bismuth-M4

Spring Cloud Data Flow 1.3.0.M2 released

Releases | Glenn Renfro | September 18, 2017 | ...

We are pleased to announce the 1.3.0. M2 release of the Spring Cloud Data Flow and its associated ecosystem of projects.

Local Server: Getting Started Guide.

Dashboard / Flo

In this second installment of 1.3 release of Dashboard/Flo, we have addressed the core functionalities backing the streaming and task/batch operations.

Continuing the Angular4 based infrastructure upgrades, the streaming and task/batch workflows now include the modern look and feel and are packed with usability improvements as well.

Documentation, test-coverage, and webpack bundle-analyzer have gone through significant…

Introducing Spring Shell 2.0M1!

Releases | Eric Bottard | September 18, 2017 | ...

We are pleased to announce the first release milestone of Spring Shell 2.x!

Two years in the making, Spring Shell 2 is a complete rewrite of Spring Shell, leveraging newer components (such as JLine 3) and applying better modularization. Spring Shell 2 is also built with Spring Boot in mind, making use of auto configuration and other boot features.

The internal architecture now uses a pluggable model to discover what methods to turn into commands, how to parse user input into argument values and how to handle return values. This is very similar to the approach taken by Spring MVC for example and allows extensions of the framework in ways that were not previously possible. Users of Spring Shell would typically not care though, only dealing with the new "standard" command API

Spring Security 5.0.0 M4 Released

Releases | Rob Winch | September 15, 2017 | ...

On behalf of the community, I’m pleased to announce the release of Spring Security 5.0.0 M4. This release includes bug fixes, new features, and is based off of Spring Framework 5.0.0 RC4. You can find complete details in the changelog. The highlights of the release include:

OAuth2 / OIDC

OAuth2 Login Java Config

There are a number of improvements to the HttpSecurity.oauth2Login() DSL.

You can now configure the Token Endpoint with a custom implementation of an AuthorizationGrantTokenExchanger or SecurityTokenRepository<AccessToken>, as follows:

protected void configure(HttpSecurity http) throws Exception {
  http
    .authorizeRequests()
      .anyRequest().authenticated()
      .and()
    .oauth2Login()
      .tokenEndpoint()
        .authorizationCodeTokenExchanger(this.authorizationCodeTokenExchanger())
	.accessTokenRepository(this.accessTokenRepository());
}

We’ve also added the capability of customizing the request paths for the Authorization Endpoint and Redirection Endpoint:

protected void configure(HttpSecurity http) throws Exception {
  http
    .authorizeRequests()
      .anyRequest().authenticated()
      .and()
    .oauth2Login()
      .authorizationEndpoint()
        .requestMatcher(new AntPathRequestMatcher("/custom-path/{clientAlias}"))
        .and()
      .redirectionEndpoint()
        .requestMatcher(new AntPathRequestMatcher("/custom-path/callback/{clientAlias}"));
}

As with all AbstractAuthenticationProcessingFilter 's in Spring Security, you can also set a custom AuthenticationSuccessHandler and AuthenticationFailureHandler:

protected void configure(HttpSecurity http) throws Exception {
  http
    .authorizeRequests()
      .anyRequest().authenticated()
      .and()
     .oauth2Login()
       .successHandler(this.customAuthenticationSuccessHandler())
       .failureHandler(this.customAuthenticationFailureHandler());
}

Security Token Repository

We’ve introduced the SecurityTokenRepository<T extends SecurityToken> abstraction, which is responsible for the persistence of SecurityToken 's.

The initial implementation InMemoryAccessTokenRepository provides the persistence of AccessToken 's. In an upcoming release we’ll also provide an implementation that supports the persistence of Refresh Token’s.

ID Token and Claims

A couple of minor improvements were introduced to the IdToken along with some final implementation details for JwtClaimAccessor, StandardClaimAccessor and IdTokenClaimAccessor, which provide convenient access to claims in their associated constructs, for example, Jwt, IdToken, UserInfo.

Authorization Request Improvements

We’ve added the capability for an AuthorizationRequestRepository to persist the Authorization Request to a Cookie. The current default implementation persists in the HttpSession, however, a custom implementation may be provided to persist to a Cookie instead.

Support was also added for URI variables configured in the redirect-uri for the AuthorizationCodeRequestRedirectFilter.

OAuth2 Client Properties

There were a couple of minor updates to the properties for configuring an OAuth 2.0 Client. The configuration below outlines the current structure. You will notice that there is support for configuring multiple clients, for example, google, github, okta, etc.

security:
  oauth2:
    client:
      google:
        client-id: your-app-client-id
        client-secret: your-app-client-secret
        client-authentication-method: basic
        authorization-grant-type: authorization_code
        redirect-uri: "{scheme}://{serverName}:{serverPort}{contextPath}/oauth2/authorize/code/{clientAlias}"
        scope: openid, profile, email, address, phone
        authorization-uri: "https://accounts.google.com/o/oauth2/v2/auth"
        token-uri: "https://www.googleapis.com/oauth2/v4/token"
        user-info-uri: "https://www.googleapis.com/oauth2/v3/userinfo"
        user-name-attribute-name: "sub"
        jwk-set-uri: "https://www.googleapis.com/oauth2/v3/certs"
        client-name: Google
        client-alias: google
      github:
        ...
      okta:
        ...

A complete example for using the new Spring Security OAuth 2.0 / OpenID Connect 1.0 login feature can be found in the Spring Security samples at oauth2login. The guide will walk you through the steps for setting up the sample application for OAuth 2.0 login using an external OAuth 2.0 or OpenID Connect 1.0 Provider.

Reactive Security

Reactive Method Security

Spring Security’s Reactive support now includes method security by leveraging Reactor’s Context. The highlights are below, but you can find a complete example of it in action in samples/javaconfig/hellowebflux-method

The first step is to use @EnableReactiveMethodSecurity to enable support for @PreAuthorize and @PostAuthorize annotations. This step ensures that the objects are properly proxied.

@EnableWebFluxSecurity
@EnableReactiveMethodSecurity
public class SecurityConfig {

The next step is to create a service that is annotated with @PreAuthorize or @PostAuthorize. For example:

@PreAuthorize("hasRole('ADMIN')")
public Mono<String> findMessage() {

Spring Security’s WebFlux support will then ensure that the Reactor Context will be populated with the current user which is used to determine if access is granted or denied.

Spring Security’s standard @WithMockUser and related annotations has been updated to work with Reactive Method Security. For example:

@RunWith(SpringRunner.class)
// ...
public class HelloWorldMessageServiceTests {
  @Autowired
  HelloWorldMessageService messages;

@Test public void messagesWhenNotAuthenticatedThenDenied() { StepVerifier.create(this.messages.findMessage()) .expectError(AccessDeniedException.class) .verify(); }

@Test @WithMockUser public void messagesWhenUserThenDenied() { StepVerifier.create(this.messages.findMessage()) .expectError(AccessDeniedException.class) .verify(); }

@Test @WithMockUser(roles = "ADMIN") public void messagesWhenAdminThenOk() { StepVerifier.create(this.messages.findMessage()) .expectNext("Hello World!") .verifyComplete(); } }

The test support also works nicely with TestWebClient. For example:

@RunWith(SpringRunner.class)
// ...
public class HelloWebfluxMethodApplicationTests {
  @Autowired
  ApplicationContext context;

WebTestClient rest;

@Before public void setup() { this.rest…

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all