Spring AMQP 2.0 Release Candidate 2 现已发布

发布 | Gary Russell | 2017 年 9 月 27 日 | ...

我很高兴地宣布 Spring AMQP 的 2.0.0.RC2 版本候选版本现已在 Spring milestone repository 中发布。

第一个版本候选版 发布以来,主要的变化有:

  • 更新至新的 5.0 版本的 amqp-client

  • 增加监听器容器的默认预取计数

自 RC1 以来的完整更改列表可在 发布说明 中找到。

感谢所有社区成员的反馈和贡献!

GA 版本将在 Spring Framework 5.0 GA 版本发布后不久发布。

有关 2.0 版本的所有更改,请参阅参考手册 “2.0 版本相比 1.7 版本的新增内容”

Spring Cloud Task 1.2.2.RELEASE 现已发布

发布 | Michael Minella | 2017年9月25日 | ...

我们很高兴地宣布 Spring Cloud Task 1.2.2.RELEASE 现已通过 Maven Central、Github 和 Pivotal 下载存储库提供。此版本增加了对 Spring Framework 最近添加的对 MySQL 序列表以外的 db 引擎的支持。特别感谢 Thomas Risberg 在此问题上的贡献。

Spring Cloud Task 主页 | GitHub 源代码 | 参考文档

我们期待您在 GithubStackOverflow,通过 Twitter 直接向我 @michaelminella 或在十二月的 SpringOnePlatform 提出您的反馈!

宣布 Reactor Core 3.1 首个发布候选版

发布 | Simon Baslé | 2017 年 9 月 18 日 | ...

我代表 Reactor 团队很高兴地宣布 reactor-core 3.1.0.RC1 已发布 ?. 这是 3.1 版本在月底前正式发布 (GA release) 的最后重要一步,也是将支持 Spring 5 的长期支持版本!

此外,还有一系列相关的版本发布,它们都整合在 Bismuth-M4 Release Train 和 BOM 中

  • reactor-test, reactor-extra, reactor-adapterreactor-logback 都已更新至 3.1.0.RC1
  • reactor-netty 在新的 0.7.0.M2 里程碑版本中有大量更新和错误修复
  • reactor-kafka 已发布其 1.0.0.M4 里程碑版本

要获取此版本,最佳方式是使用 BOM,如参考指南 此处 所述。请务必阅读有关 milestones 的部分(将其转换为 Bismuth-M4…)。

Spring Cloud Data Flow 1.3.0.M2 发布

发布 | Glenn Renfro | 2017 年 9 月 18 日 | ...

我们很高兴地宣布 Spring Cloud Data Flow 及其相关项目生态系统的 1.3.0. M2 版本发布。

本地服务器:入门指南

Dashboard / Flo

在 Dashboard/Flo 1.3 系列的第二个版本中,我们解决了支持流和任务/批处理操作的核心功能。

Angular4 的基础设施升级 的基础上,流和任务/批处理工作流程现在拥有现代化的外观和感觉,并提供了易用性改进。

文档测试覆盖率webpack bundle-analyzer 已经进行了显著的改进……

介绍 Spring Shell 2.0M1!

版本发布 | Eric Bottard | 2017 年 9 月 18 日 | ...

我们很高兴地宣布 Spring Shell 2.x 的第一个里程碑版本!

历时两年打造,Spring Shell 2 是 Spring Shell 的完全重写,利用了更新的组件(如 JLine 3)并采用了更好的模块化。Spring Shell 2 在构建时也考虑到了 Spring Boot,利用了自动配置和其他 Boot 功能。

内部架构现在使用可插拔模型来发现哪些方法可以转换为命令,如何将用户输入解析为参数值以及如何处理返回值。这与 Spring MVC 等采取的方法非常相似,并允许以以前不可能的方式扩展框架。不过,Spring Shell 的用户通常不会关心这些,只会处理新的“标准”命令 API

Spring Security 5.0.0 M4 发布

发布 | Rob Winch | 2017 年 9 月 15 日 | ...

我谨代表社区,很高兴地宣布 Spring Security 5.0.0 M4 的发布。此版本包含错误修复、新功能,并基于 Spring Framework 5.0.0 RC4。您可以在 更改日志 中找到完整详细信息。此版本的主要亮点包括:

OAuth2 / OIDC

OAuth2 登录 Java 配置

HttpSecurity.oauth2Login() DSL 有许多改进。

您现在可以使用自定义的 AuthorizationGrantTokenExchangerSecurityTokenRepository<AccessToken> 实现来配置Token Endpoint,如下所示:

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

我们还增加了自定义授权端点重定向端点的请求路径的能力。

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}"));
}

与 Spring Security 中的所有 AbstractAuthenticationProcessingFilter 一样,您还可以设置自定义的 AuthenticationSuccessHandlerAuthenticationFailureHandler

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

安全令牌存储库

我们引入了 SecurityTokenRepository<T extends SecurityToken> 抽象,它负责 SecurityToken 的持久化。

初始实现 InMemoryAccessTokenRepository 提供了 AccessToken 的持久化。在即将发布的版本中,我们还将提供支持Refresh Token持久化的实现。

ID Token 和 Claims

IdToken 中引入了一些小的改进,以及 JwtClaimAccessorStandardClaimAccessorIdTokenClaimAccessor 的一些最终实现细节,它们提供了对关联构造中的 claims 的便捷访问,例如 JwtIdTokenUserInfo

授权请求改进

我们增加了 AuthorizationRequestRepository授权请求持久化到 Cookie 的能力。当前的默认实现将其持久化到 HttpSession,但是,可以提供自定义实现来将其持久化到 Cookie

还添加了对 AuthorizationCodeRequestRedirectFilterredirect-uri 中配置的 URI 变量的支持。

OAuth2 客户端属性

对 OAuth 2.0 客户端的配置属性进行了一些小的更新。下面的配置概述了当前的结构。您会注意到支持配置多个客户端,例如 google、github、okta 等。

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://#/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:
        ...

有关使用新的 Spring Security OAuth 2.0 / OpenID Connect 1.0 登录功能的完整示例,请参阅 Spring Security 示例中的 oauth2login。该指南将引导您完成使用外部 OAuth 2.0 或 OpenID Connect 1.0 提供程序设置示例应用程序进行 OAuth 2.0 登录的步骤。

响应式安全

响应式方法安全

Spring Security 的响应式支持现在通过利用 Reactor 的 Context 来支持方法安全。以下是主要亮点,您可以在 samples/javaconfig/hellowebflux-method 中找到一个完整的示例。

第一步是使用 @EnableReactiveMethodSecurity 来启用对 @PreAuthorize@PostAuthorize 注解的支持。此步骤可确保对象得到正确代理。

@EnableWebFluxSecurity
@EnableReactiveMethodSecurity
public class SecurityConfig {

下一步是创建一个用 @PreAuthorize@PostAuthorize 注解的服务。例如:

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

Spring Security 的 WebFlux 支持将确保 Reactor Context 将填充当前用户,用于确定是否授予或拒绝访问。

Spring Security 的标准 @WithMockUser相关注解 已更新为支持响应式方法安全。例如:

@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(); } }

测试支持也很好地支持 TestWebClient。例如:

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

WebTestClient rest;

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

Spring Session 2.0.0 M4

发布 | Rob Winch | 2017 年 9 月 15 日 | ...

我谨代表社区,很高兴地宣布 Spring Session 2.0.0.M4 的发布。此版本主要侧重于改进 WebFlux 支持。主要亮点包括:

简化的 WebFlux 配置

为 WebFlux 配置 Spring Session 已简化为:

@Configuration
@EnableSpringWebSession
public class HelloWebfluxSessionConfig {

  @Bean
  public MapReactorSessionRepository reactorSessionRepository() {
    return new MapReactorSessionRepository(new ConcurrentHashMap<>());
  }
}

您还可以通过添加 WebSessionIdResolver Bean 来切换解析会话 ID 的策略。例如,要从使用 Cookie 解析会话 ID 切换到使用 Header,您可以使用 Spring Framework 新的 HeaderWebSessionIdResolver

Spring Boot 2.0.0 M4 现已发布

发布 | Stéphane Nicoll | 2017 年 9 月 15 日 | ...

紧随 最新的 Spring Framework 5 版本候选版 之后,Spring Boot 2.0 M4 现已在 我们的 milestone repository 中提供。此版本解决了 150 个问题和拉取请求,是迈向 2.0 GA 的重要一步。感谢所有贡献者!

此里程碑提供了一系列小的调整和增强,以及三个主要变更:

有关更改的完整列表以及升级说明,请参阅 WIKI 上的 Spring Boot 2.0.0.M4 发行说明。我们在更新参考文档方面有些落后,因此请考虑使用 snapshot 版本

获取 Spring 新闻通讯

通过 Spring 新闻通讯保持联系

订阅

领先一步

VMware 提供培训和认证,助您加速进步。

了解更多

获得支持

Tanzu Spring 提供 OpenJDK™、Spring 和 Apache Tomcat® 的支持和二进制文件,只需一份简单的订阅。

了解更多

即将举行的活动

查看 Spring 社区所有即将举行的活动。

查看所有