profile
viewpoint
Brian Clozel bclozel Pivotal, Inc. Lyon, France http://spring.io/team/bclozel Spring Framework and Spring Boot committer @spring-projects

bclozel/http2-experiments 36

Companion repo for the "HTTP/2 for the web developer" talk

bclozel/gulp-bower-src 14

Gulp-src bower components files

bclozel/initializr-stats 12

Companion apps for the Spring Boot 2.0 Web Apps talk

bclozel/gulp-cram 7

Gulp plugin - assemble resources using cujoJS cram

bclozel/bootjug 2

Intro to Spring Boot

bclozel/cfp-example 1

Sample app for the "10 ways to get super-productive with Spring Boot" talk

push eventspring-projects/spring-boot

Brian Clozel

commit sha 11b9862064216be860a014e03981a58293d1cb14

Revert "Clear ProducesRequestCondition cache attribute" Closes gh-20292

view details

Brian Clozel

commit sha e73ee7b3fe2679e67685c3672493f9f9a9f9406f

Merge branch '2.2.x' Closes gh-20293

view details

push time in 2 days

issue closedspring-projects/spring-boot

Remove ProducesRequestCondition cache clear task from Actuator

Forward port of issue #20292 to 2.3.0.M3.

closed time in 2 days

bclozel

issue closedspring-projects/spring-boot

Remove ProducesRequestCondition cache clear task from Actuator

This issue is about removing changes introduced in #20150, since /spring-projects/spring-framework#24466 moved that code snippet up in the class hierarchy.

closed time in 2 days

bclozel

issue openedspring-projects/spring-boot

Remove ProducesRequestCondition cache clear task from Actuator

Forward port of issue #20292 to 2.3.0.M3.

created time in 2 days

push eventspring-projects/spring-boot

Brian Clozel

commit sha 11b9862064216be860a014e03981a58293d1cb14

Revert "Clear ProducesRequestCondition cache attribute" Closes gh-20292

view details

push time in 2 days

issue openedspring-projects/spring-boot

Remove ProducesRequestCondition cache clear task from Actuator

This issue is about removing changes introduced in #20150, since /spring-projects/spring-framework#24466 moved that code snippet up in the class hierarchy.

created time in 2 days

push eventspring-projects/spring-boot

Brian Clozel

commit sha ab72cc8fdbc55adf54a8c33371b77e7f8d9782e1

Revert "Add actuator specific ObjectMapper" See gh-12951 See gh-20291

view details

push time in 2 days

issue commentspring-projects/spring-boot

Add actuator specific ObjectMapper

Actually, closing in favor of #20291 as we need to keep this issue tied to the released 2.3.0.M2 version.

vilhelm-persson-viper

comment created time in 2 days

issue closedspring-projects/spring-boot

Add actuator specific ObjectMapper

When using a custom object mapper with MapperFeature.AUTO_DETECT_GETTERS disabled the detailed information for Health endpoint is not returned.

The status is returned as expected but not the detailed information.

From the code the getStatus method has Jackson annotation but the getDetails is lacking annotation.

Problem found using SpringBoot spring-boot-starter-parent version 2.0.1.RELEASE.

As a workaround and for verification of the problem is related to Jackson an MixIn class where created annotation for getStatus and getDetails and after that the information where displayed as expected.

mapper.addMixIn(Health.class, HealthMixIn.class);
public abstract class HealthMixIn {
  @JsonValue public abstract Object getStatus();
  @JsonValue public abstract Object getDetails();
}

How to repeat:

@Bean
@Primary
public ObjectMapper create() {
    ObjectMapper mapper = new ObjectMapper();
    mapper.disable(MapperFeature.AUTO_DETECT_GETTERS)
    return mapper;
}

closed time in 2 days

vilhelm-persson-viper

issue openedspring-projects/spring-boot

Add actuator specific ObjectMapper

This is a new attempt at fixing #12951, since the original fix caused regressions (see #20211).

created time in 2 days

issue closedspring-projects/spring-boot

spring.jackson.serialization.indent-output doesn't work with Spring Boot 2.3.0.M2 when using Actuator

<!-- Thanks for raising a Spring Boot issue. Please take the time to review the following categories as some of them do not apply here.

🙅 "Please DO NOT Raise an Issue" Cases

  • Question STOP!! Please ask questions about how to use something, or to understand why something isn't working as you expect it to, on Stack Overflow using the spring-boot tag.
  • Security Vulnerability STOP!! Please don't raise security vulnerabilities here. Head over to https://pivotal.io/security to learn how to disclose them responsibly.
  • Managed Dependency Upgrade You DO NOT need to raise an issue for a managed dependency version upgrade as there's a semi-automatic process for checking managed dependencies for new versions before a release. BUT pull requests for upgrades that are more involved than just a version property change are still most welcome.
  • With an Immediate Pull Request An issue will be closed as a duplicate of the immediate pull request, so you don't have to raise an issue if you plan to create a pull request immediately.

🐞 Bug report (please don't include this emoji/text, just add your details) Please provide details of the problem, including the version of Spring Boot that you are using. If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it.

🎁 Enhancement (please don't include this emoji/text, just add your details) Please start by describing the problem that you are trying to solve. There may already be a solution, or there may be a way to solve it that you hadn't considered.

TIP: You can always edit your issue if it isn't formatted correctly. See https://guides.github.com/features/mastering-markdown --> spring.jackson.serialization.indent-output doesn't work with Spring Boot 2.3.0.M2. I confirmed that it works with Spring Boot 2.3.0.M1.

This is a sample project to reproduce it: https://github.com/izeye/spring-boot-throwaway-branches/tree/spring-boot-2.3.0.M2-jackson-indent-output

And this is a sample endpoint to check: http://localhost:8080/persons

closed time in 2 days

izeye

issue commentspring-projects/spring-boot

spring.jackson.serialization.indent-output doesn't work with Spring Boot 2.3.0.M2 when using Actuator

I've reopened #12951 and created #20290. I'm closing this issue as it's superseded by those.

izeye

comment created time in 2 days

IssuesEvent

issue commentspring-projects/spring-boot

Add actuator specific ObjectMapper

We need to revert that change because of #20211.

With the current Actuator setup, a custom annotation-based HandlerMapping instance for Actuator endpoints will still share the RequestMappingHandlerAdapter infrastructure with the main application. In the case of #20211, we can't really have actuator-specific HTTP message converters, as we would need to only involve them for some endpoints.

Instead, we should consider whether we can implement the MVC web adapter layer for Actuator using Servlet Functional Endpoints, see #20290. In that mode, the message converters would be limited to that specific HandlerMapping implementation. Right now, adding another message converter to the list has side-effects on the main application and this is not acceptable.

vilhelm-persson-viper

comment created time in 2 days

issue commentspring-projects/spring-boot

Rewrite Actuator MVC adapter layer for Servlet Functional Endpoints

@spencergibb If you're talking about @WebEndpoint and @WebEndpointExtension, this is covered by a web stack agnostic infrastructure - so no, this should break backwards compatibility.

bclozel

comment created time in 2 days

issue commentspring-projects/spring-boot

Rewrite Actuator MVC adapter layer for Servlet Functional Endpoints

A first attempt at this lead to spring-projects/spring-framework#24564 and spring-projects/spring-framework#24562.

bclozel

comment created time in 2 days

issue openedspring-projects/spring-boot

Rewrite Actuator MVC adapter layer for Servlet Functional Endpoints

The Actuator MVC adapter layer is based on the MVC annotation model (especially AbstractWebMvcEndpointHandlerMapping, which extends RequestMappingInfoHandlerMapping). In this mode, we've got to use the annotation model in ways that aren't really ideal: programmatically registering handlers with conditions extracted from the Actuator configuration model, having very general controller handlers that mainly work because of Spring MVC flexibility.

And general and especially for #12951, we'd like to make Actuator web support independent of the main application. Without this, configuration changes in the main application will be reflected on Actuator endpoints (like the response format), which makes things inconsistent between applications. The main goal of Actuator is to provide a common, consistent model across applications, no matter what web stack they're using.

As seen in #20211, we might have found the limits of the current Actuator web adapter layer for Spring MVC. Spring Framework now ships Servlet Functional Endpoints. Unlike the annotation model, they're designed for programmatic registrations and the message converters configuration is bound to the RouterFunctionHandlerMapping instance, whereas with the annotation model it's separate and tied to RequestMappingHandlerAdapter.

This issue should consider whether reimplementing the MVC web adapter layer for Actuator using Servlet Functional Endpoints would be possible and solve our current issues.

created time in 2 days

push eventspring-io/sagan

Brian Clozel

commit sha 4ccba9e16c9abeda6d054881f7f0cb1613d03484

Add link to top from STS3 info section

view details

push time in 2 days

issue openedspring-projects/spring-framework

Consider supporting PreFlight requests and CORS in Servlet Functional Endpoints

Spring MVC supports CORS with simple and pre-flight requests.

Spring MVC provides support for global CORS handling with a filter, but also local support with @CorsMapping annotations or a CorsConfiguration instance, which is provided to AbstractHandlerMapping implementations.

In the case of Servlet Functional Endpoints, the provided CorsConfiguration has no effect on pre-flight requests.

Here is a sample application:

@Configuration
public class SampleRouterConfig {

	@Bean
	public RouterFunction<ServerResponse> router() {
		return RouterFunctions.route()
				.POST("/function", (req) -> ServerResponse.ok().body("Hello"))
				.build();
	}
}
@Configuration
public class WebConfig implements WebMvcConfigurer {

	@Override
	public void addCorsMappings(CorsRegistry registry) {
		registry.addMapping("/**")
				.allowedOrigins("https://spring.io")
				.maxAge(3600);
	}
}

In this case, the following request will not match any handler, and other HandlerMapping later in the chain will handle this:

OPTIONS http://localhost:8080/test
Origin: https://spring.io
Access-Control-Request-Method: POST

Other HandlerMapping implementations have additional checks in the request matching infrastructure to check requests with CorstUtils.isPreFlightRequest(request). See implementations of AbstractRequestCondition and also AbstractHandlerMethodMapping itself.

I'm wondering if we should have here additional RequestPredicates to locally manage CORS requests, or if existing predicates should look for pre-flight requests and match anyway.

created time in 2 days

PR closed spring-io/sagan

Reviewers
Tools suite dialogue

Changed the text in the Spring Tools 3 dialogue near the bottom of the page.

+1 -2

1 comment

1 changed file

benwilcock

pr closed time in 2 days

pull request commentspring-io/sagan

Tools suite dialogue

Fixed with 4e4e368b0d4fa Thanks!

benwilcock

comment created time in 2 days

push eventspring-io/sagan

Brian Clozel

commit sha 4e4e368b0d4fa0406d1418c875fe1af79bdfcf50

Update link to Spring Tools 3

view details

Brian Clozel

commit sha 7e4e90dd6fa9d2a50bc7b874107b6c28fc0a1f0c

Redirect /tools3.* requests to /tools This commit redirects requests to the former /tools3 pages to the /tools page, on a specific anchor explaining where to find resources.

view details

Brian Clozel

commit sha 7e44f549cb957b29a1c3b87aafcd8acf93008b8d

Remove /tools3 page and previous STS3 infrastructure

view details

push time in 2 days

issue openedspring-projects/spring-framework

Support for byte-range requests in Servlet Functional endpoints

Right now in Spring MVC and WebFlux we support byte-range requests for Resource response bodies. This is supported by infrastructure like ResourceRegion, HttpRange and ResourceRegionHttpMessageConverter - those are able to convert parts of Resource instances according to the requested ranges.

In Spring MVC, a critical part for that is implemented in AbstractMessageConverterMethodProcessor: detecting whether the request asks for byte ranges, and turning the Resource into a collection of ResourceRegion accordingly, to then let the message converter write those to the response.

In Spring MVC functional endpoints, we're missing that last part currently.

We can achieve that currently with:

Resource resource = ...
List<HttpRange> httpRanges = request.headers().range();
if(!httpRanges.isEmpty()) {
  return  ServerResponse.status(HttpStatus.PARTIAL_CONTENT)
		.contentType(MediaType.APPLICATION_OCTET_STREAM)
		.body(HttpRange.toResourceRegions(httpRanges, resource), new ParameterizedTypeReference<List<ResourceRegion>>() {});
}

Now I'm wondering how we could make this easier with functional endpoints. Handling that directly in ServerResponse can be challenging since it might be not expected by developers and we don't have access to the request at that point.

The ResourceHandlerFunction might be a better place for that, but it might lack flexibility since it would only work when mapping a particular handler and not whenever we want to return a Resource as a response body.

created time in 2 days

issue commentspring-projects/spring-boot

Spring Boot Actuator Endpoints for Scheduled Tasks

Waiting for spring-projects/spring-framework#24560

enesify

comment created time in 3 days

issue openedspring-projects/spring-framework

Add execution metadata to scheduled tasks

@enesify requested an enhancement on Spring Boot, where actuator endpoints could provide more information about scheduled tasks.

Currently, the /actuator/scheduledtasks actuator endpoint provides information about scheduled tasks, including their type, target and scheduling information.

The enhancement request would require more metadata being present on the tasks themselves, such as:

  • last Execution Time
  • last Execution Status
  • next Execution Time

The issue also requests the ability to change a cron expression or to manually trigger a task. For that, Spring Boot would need a unique identifier for each task, which they don't have at the moment.

See spring-projects/spring-boot#17585 for context.

created time in 3 days

issue commentspring-projects/spring-boot

spring-boot-starter-rsocket pom contains security dependencies

That's odd. I don't remember any decision around that. Probably a copy/paste issue during the Gradle migration?

rwinch

comment created time in 3 days

issue closedspring-projects/spring-boot

When NettyDriverMongoClientSettingsBuilderCustomizer is called multiple times, only the last EventLoopGroup that it creates is closed on shutdown

Hi,

In spring boot I create two MongoDB reactive clients:

List<MongoClientSettingsBuilderCustomizer> customizerList;   // autowired
MongoClientSettings.Builder builder = MongoClientSettings.builder().applyConnectionString(connectionString);
customizerList.forEach(customizer -> customizer.customize(builder));
MongoClient mongoClient = MongoClients.create(builder.build());

I see problem with MongoReactiveAutoConfiguration, rather NettyDriverMongoClientSettingsBuilderCustomizer. In my case the method NettyDriverMongoClientSettingsBuilderCustomizer#customize is called twice

                        private volatile EventLoopGroup eventLoopGroup;

			@Override
			public void customize(Builder builder) {
				if (!isStreamFactoryFactoryDefined(this.settings.getIfAvailable())) {
					NioEventLoopGroup eventLoopGroup = new NioEventLoopGroup();
					this.eventLoopGroup = eventLoopGroup;
					builder.streamFactoryFactory(NettyStreamFactoryFactory.builder()
							.eventLoopGroup(eventLoopGroup).build());
				}
			}

eventually new NioEventLoopGroup() is created twice, but reference only last instance. destroy method clear only last NioEventLoopGroup

			@Override
			public void destroy() {
				EventLoopGroup eventLoopGroup = this.eventLoopGroup;
				if (eventLoopGroup != null) {
					eventLoopGroup.shutdownGracefully().awaitUninterruptibly();
					this.eventLoopGroup = null;
				}
			}

And my application not shutdown correctly.

Why we must create new NioEventLoopGroup() on each call customize? Why not:

                        private EventLoopGroup eventLoopGroup = new NioEventLoopGroup();

			@Override
			public void customize(Builder builder) {
				if (!isStreamFactoryFactoryDefined(this.settings.getIfAvailable())) {
					builder.streamFactoryFactory(NettyStreamFactoryFactory.builder()
							.eventLoopGroup(eventLoopGroup).build());
				}
			}

closed time in 3 days

deripas

issue commentspring-projects/spring-boot

When NettyDriverMongoClientSettingsBuilderCustomizer is called multiple times, only the last EventLoopGroup that it creates is closed on shutdown

We've discussed this issue and we think that this approach is flawed.

Spring Boot *Customizer classes are meant to be applied on each instance of the thing meant to be customized. So in this case, creating a new EventLoop for each call in the customizer itself, or changing the client itself to only accept a single instance are not valid approaches for this issue.

For a similar issue, Spring Framework introduced a ReactorResourceFactory for sharing resources between the server and clients. An instance of that class is auto-configured and managed as a bean by Spring Boot. This component is also bound to the context lifecycle, so that the resources are properly cleaned when the application context shuts down.

A better approach would be to create a similar component (implementing InitializingBean, DisposableBean) and inject it as a dependency in the customizer. Applying that customizer multiple times would configure the same resources on all clients.

Now the ReactorResourceFactory is only meant for Reactor Netty, and the Spring Boot team doesn't think that it would be wise at that point to create such a component for all libraries using Netty. We could reconsider a better arrangement in the future, but for now the wide variety of libraries, repackaged Netty versions and use of those resources will not make that a trivial change.

deripas

comment created time in 3 days

PR closed spring-projects/spring-boot

Use a single instance of `EventLoopGroup` to configure `NettyStreamFactory` status: on-hold status: waiting-for-triage

Prior to this commit, NettyDriverMongoClientSettingsBuilderCustomizer could create more than one instance of NioEventLoopGroup in case if it has been invoked for several MongoClientSettings, but the reference was only to the last instance, hence shutdown was invoked only for the last NioEventLoopGroup.

see gh-17533

+15 -2

5 comments

1 changed file

nosan

pr closed time in 3 days

pull request commentspring-projects/spring-boot

Use a single instance of `EventLoopGroup` to configure `NettyStreamFactory`

I'm closing this PR as I don't think that shared resources like this should be managed by the auto-configuration itself. Just like we have a ReactorResourceFactory now in Spring Framework, I believe they should be bound to the context lifecycle with a component in the first place.

I'll add more about that in a comment in #17533

Thanks @nosan for your help!

nosan

comment created time in 3 days

pull request commentspring-io/sagan

Add anchor on title on guide page

I see that we needed some additional JS to add the missing links in the HTML.

I think I could change the guide rendering configuration to have the same as what we've got right now for blog posts:

<h2>
  <a href="#we-love-a-challenge-hellip" class="anchor" name="we-love-a-challenge-hellip"></a>
  We love a challenge…
</h2>

I'm fine with your PR and this approach, just wondering if you'd prefer something done on the server side for more consistency.

oodamien

comment created time in 3 days

push eventspring-io/spring-doc-resources

push time in 3 days

issue closedspring-projects/spring-boot

ResolutionException when running Spring Boot as Java module

Problem

I get a ResolutionException on startup when I create a Spring boot application with Spring Initializr with both spring-boot-starter-webflux and spring-boot-starter-web dependencies and I turn the project into a Java module (Project Jigsaw), by adding a module-info.java

module demo {
    requires spring.boot.autoconfigure;
    requires spring.boot;
}

The error:

java.lang.module.ResolutionException: 
Modules jakarta.el and org.apache.tomcat.embed.jasper.el export package javax.el to module spring.boot.starter.web

Cause

When using both spring-boot-starter-webflux and spring-boot-starter-web dependencies, there is a split package: javax.el

This package is present in both jakarta.el-3.0.3.jar and tomcat-embed-el-9.0.30.jar

Versions

Java version: OpenJDK 11.0.4+11 (AdoptOpenJDK Hotspot) Spring Boot project, from Spring Initializr: Startup command (from IntelliJ):

/usr/lib/jvm/jdk-11.0.4+11/bin/java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -p /home/ivo/Downloads/demo/target/classes:/home/ivo/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.2.4.RELEASE/spring-boot-starter-web-2.2.4.RELEASE.jar:/home/ivo/.m2/repository/org/springframework/boot/spring-boot-starter/2.2.4.RELEASE/spring-boot-starter-2.2.4.RELEASE.jar:/home/ivo/.m2/repository/org/springframework/boot/spring-boot/2.2.4.RELEASE/spring-boot-2.2.4.RELEASE.jar:/home/ivo/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.2.4.RELEASE/spring-boot-autoconfigure-2.2.4.RELEASE.jar:/home/ivo/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.2.4.RELEASE/spring-boot-starter-logging-2.2.4.RELEASE.jar:/home/ivo/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/home/ivo/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/home/ivo/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.12.1/log4j-to-slf4j-2.12.1.jar:/home/ivo/.m2/repository/org/apache/logging/log4j/log4j-api/2.12.1/log4j-api-2.12.1.jar:/home/ivo/.m2/repository/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar:/home/ivo/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/home/ivo/.m2/repository/org/yaml/snakeyaml/1.25/snakeyaml-1.25.jar:/home/ivo/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.2.4.RELEASE/spring-boot-starter-json-2.2.4.RELEASE.jar:/home/ivo/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.10.2/jackson-databind-2.10.2.jar:/home/ivo/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.10.2/jackson-annotations-2.10.2.jar:/home/ivo/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.10.2/jackson-core-2.10.2.jar:/home/ivo/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.10.2/jackson-datatype-jdk8-2.10.2.jar:/home/ivo/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.10.2/jackson-datatype-jsr310-2.10.2.jar:/home/ivo/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.10.2/jackson-module-parameter-names-2.10.2.jar:/home/ivo/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.2.4.RELEASE/spring-boot-starter-tomcat-2.2.4.RELEASE.jar:/home/ivo/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.30/tomcat-embed-core-9.0.30.jar:/home/ivo/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/9.0.30/tomcat-embed-el-9.0.30.jar:/home/ivo/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.30/tomcat-embed-websocket-9.0.30.jar:/home/ivo/.m2/repository/org/springframework/boot/spring-boot-starter-validation/2.2.4.RELEASE/spring-boot-starter-validation-2.2.4.RELEASE.jar:/home/ivo/.m2/repository/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar:/home/ivo/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.18.Final/hibernate-validator-6.0.18.Final.jar:/home/ivo/.m2/repository/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar:/home/ivo/.m2/repository/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar:/home/ivo/.m2/repository/org/springframework/spring-web/5.2.3.RELEASE/spring-web-5.2.3.RELEASE.jar:/home/ivo/.m2/repository/org/springframework/spring-beans/5.2.3.RELEASE/spring-beans-5.2.3.RELEASE.jar:/home/ivo/.m2/repository/org/springframework/spring-webmvc/5.2.3.RELEASE/spring-webmvc-5.2.3.RELEASE.jar:/home/ivo/.m2/repository/org/springframework/spring-aop/5.2.3.RELEASE/spring-aop-5.2.3.RELEASE.jar:/home/ivo/.m2/repository/org/springframework/spring-context/5.2.3.RELEASE/spring-context-5.2.3.RELEASE.jar:/home/ivo/.m2/repository/org/springframework/spring-expression/5.2.3.RELEASE/spring-expression-5.2.3.RELEASE.jar:/home/ivo/.m2/repository/org/springframework/boot/spring-boot-starter-webflux/2.2.4.RELEASE/spring-boot-starter-webflux-2.2.4.RELEASE.jar:/home/ivo/.m2/repository/org/springframework/boot/spring-boot-starter-reactor-netty/2.2.4.RELEASE/spring-boot-starter-reactor-netty-2.2.4.RELEASE.jar:/home/ivo/.m2/repository/io/projectreactor/netty/reactor-netty/0.9.4.RELEASE/reactor-netty-0.9.4.RELEASE.jar:/home/ivo/.m2/repository/io/netty/netty-codec-http/4.1.45.Final/netty-codec-http-4.1.45.Final.jar:/home/ivo/.m2/repository/io/netty/netty-common/4.1.45.Final/netty-common-4.1.45.Final.jar:/home/ivo/.m2/repository/io/netty/netty-buffer/4.1.45.Final/netty-buffer-4.1.45.Final.jar:/home/ivo/.m2/repository/io/netty/netty-transport/4.1.45.Final/netty-transport-4.1.45.Final.jar:/home/ivo/.m2/repository/io/netty/netty-resolver/4.1.45.Final/netty-resolver-4.1.45.Final.jar:/home/ivo/.m2/repository/io/netty/netty-codec/4.1.45.Final/netty-codec-4.1.45.Final.jar:/home/ivo/.m2/repository/io/netty/netty-codec-http2/4.1.45.Final/netty-codec-http2-4.1.45.Final.jar:/home/ivo/.m2/repository/io/netty/netty-handler/4.1.45.Final/netty-handler-4.1.45.Final.jar:/home/ivo/.m2/repository/io/netty/netty-handler-proxy/4.1.45.Final/netty-handler-proxy-4.1.45.Final.jar:/home/ivo/.m2/repository/io/netty/netty-codec-socks/4.1.45.Final/netty-codec-socks-4.1.45.Final.jar:/home/ivo/.m2/repository/io/netty/netty-transport-native-epoll/4.1.45.Final/netty-transport-native-epoll-4.1.45.Final-linux-x86_64.jar:/home/ivo/.m2/repository/io/netty/netty-transport-native-unix-common/4.1.45.Final/netty-transport-native-unix-common-4.1.45.Final.jar:/home/ivo/.m2/repository/org/glassfish/jakarta.el/3.0.3/jakarta.el-3.0.3.jar:/home/ivo/.m2/repository/org/springframework/spring-webflux/5.2.3.RELEASE/spring-webflux-5.2.3.RELEASE.jar:/home/ivo/.m2/repository/org/synchronoss/cloud/nio-multipart-parser/1.1.0/nio-multipart-parser-1.1.0.jar:/home/ivo/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar:/home/ivo/.m2/repository/org/synchronoss/cloud/nio-stream-storage/1.1.3/nio-stream-storage-1.1.3.jar:/home/ivo/.m2/repository/org/springframework/spring-core/5.2.3.RELEASE/spring-core-5.2.3.RELEASE.jar:/home/ivo/.m2/repository/org/springframework/spring-jcl/5.2.3.RELEASE/spring-jcl-5.2.3.RELEASE.jar:/home/ivo/.m2/repository/io/projectreactor/reactor-core/3.3.2.RELEASE/reactor-core-3.3.2.RELEASE.jar:/home/ivo/.m2/repository/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar -m demo/com.example.demo.DemoApplication

closed time in 3 days

ivohuisjes

issue commentspring-projects/spring-boot

ResolutionException when running Spring Boot as Java module

Spring Boot provides dependency management and starters for these projects, but the structure of all of these modules is out of our control. You should report the problems to the relevant projects or ask for guidance for those particular cases.

The general advice from the Spring Boot team is to use Java in classpath mode until the ecosystem has caught up.

In this particular instance, the EL dependency issue will be solved in Spring Boot 2.3 with #19550. In the meantime, you can exclude the validation starter (if you don't need it).

ivohuisjes

comment created time in 3 days

issue closedspring-projects/spring-boot

Repository query is failing to filter documents on a DBRefs fields after spring boot upgrade.

Upgrading form spring boot version 2.1 to 2.2 and mongodb from 4.0.16 to 4.2.3 the query below is not working as it was before. When we provide the tenantId parameter the query is kind of ignoring this argument, returning an empty result. The tenant is actually a DBRef filed in another document called broadcast.

@Query(value = "{$and :["
            + "?#{ [0] == null ? { $where : 'true'} : { 'tenant.id' : [0] } },"
            + "?#{ [1] == null ? { $where : 'true'} : { 'status' : { $in: [1] } } },"
            + "?#{ [2] == null ? { $where : 'true'} : { 'sendAt' : { $lt: [2] } } },"
            + "?#{ [3] == null ? { $where : 'true'} : { 'type' :  [3] } },"
            + "?#{ [4] == null ? { $where : 'true'} : { 'sendAt' : { $gte: [4] } } }"
            + " ] }", count = true)
    public List<Broadcast> findByCriteria(String tenantId, List<String> status, Date sendBefore, String type, Date sendAfter, Pageable pageable);

Below you can find part of the broadcast class.

@Document(collection = "broadcasts")
@TypeAlias(value = "Broadcast")
@CompoundIndexes({
        @CompoundIndex(name = "status_sendAt", def = "{'status': 1, 'sendAt': 1}", background = true)
})
public class Broadcast {

    @Id
    private String id;

    private String label;

    @DBRef
    @Indexed(background = true)
    private Tenant tenant;

    @DBRef
    private List<Group> groups = new ArrayList<>();

    private BroadcastMethod method;

    private String text;

    private BroadcastType type;

    private String image;

    @Indexed(background = true)
    private BroadcastStatus status;
}

I have been testing directly to the database via mongo compass, filtering by the following context,

{"tenant.$id": ObjectId("5d9610d8dbcb1e0aaaf95eae")}

and this is working flawlessly, so I'm making the assumption that maybe something goes wrong with the latest version of spring boot mongo data (2.2.4) or the mongodb driver (3.11.2) itself.

closed time in 3 days

tzeikob

issue commentspring-projects/spring-boot

Repository query is failing to filter documents on a DBRefs fields after spring boot upgrade.

Thanks a lot @christophstrobl , I'll close this issue for now as this change probably didn't happen in this codebase directly. @tzeikob please let us know about this problem (a link to a new issue and a sample) in the comments here as well.

tzeikob

comment created time in 3 days

issue commentspring-projects/spring-boot

Repository query is failing to filter documents on a DBRefs fields after spring boot upgrade.

This might be a change in Spring Data MongoDB or MongoDB itself. Did you see something interesting in the bug tracker or in the new & noteworthy section?

Could you log the actual requests being sent to the database? Did you test the query directly against MongoDB 4.2.3?

A lot of things changed at once, so it's hard to pinpoint exactly what's going on. Maybe @christophstrobl has an idea?

tzeikob

comment created time in 3 days

issue commentspring-projects/spring-boot

Remove vulnerable jersey-media-json-jackson1

Spring Boot does not depend on jersey-media-json-jackson1, and already relies on jersey-media-json-jackson only. What makes you think it is?

We do import the jersey-bom which declares the version management for jersey-media-json-jackson1. If you think this dependency should not be managed at all, you'll need to take this with the Jersey team which is in control of that BOM.

ManjunathMS35

comment created time in 3 days

push eventspring-io/sagan

Damien Vitrac

commit sha 921647ad04eef6b6bfce276da2405a79328afc00

Add robots.txt plugin on webpack build

view details

push time in 3 days

PR merged spring-io/sagan

Reviewers
Add robots.txt plugin on webpack build
+21 -4

0 comment

2 changed files

oodamien

pr closed time in 3 days

push eventspring-io/sagan

Brian Clozel

commit sha 6d4496c8257428545f7da1842eb7bd3bdb82e707

Fix main blog Atom feed URL on blog page

view details

push time in 4 days

push eventspring-io/sagan

Brian Clozel

commit sha baf4b74a8ed4a5ddb4c94056721b3cc59167d73a

Configure Gradle cache in Concourse build

view details

push time in 5 days

PR closed spring-io/sagan

Reviewers
Reworded the quickstart build-and-run

Folks found the direct mention of Maven confusing when it's not actually needed thansk to the inclusion of the Maven Wrapper in the Initializr projects.

+1 -1

1 comment

1 changed file

benwilcock

pr closed time in 5 days

pull request commentspring-io/sagan

Reworded the quickstart build-and-run

Merged with 06ed98f58a996fd5483 - thanks!

benwilcock

comment created time in 5 days

push eventspring-io/sagan

Ben Wilcock

commit sha 06ed98f58a996fd54839418950c7c66e87e57591

reworded the build-and-run section of the quickstart

view details

push time in 5 days

push eventspring-io/sagan

Damien Vitrac

commit sha cb61f22aa87db164d6ff2be180f51a993463a19a

Revisit admin

view details

push time in 5 days

PR merged spring-io/sagan

Revisit admin
+252 -91

0 comment

13 changed files

oodamien

pr closed time in 5 days

issue commentspring-projects/spring-framework

Configure quiet period for shutting down Netty resources

Before we implement this, I'd like to run things by @violetagg to make sure we're on the right track.

Since reactor/reactor-netty#860, there are additional methods on LoopResources to specify the quiet period when shutting them down. In Spring Framework, we have a ReactorResourceFactory that allows developers to configure in a central place LoopResources and ConnectionProvider.

In Spring Boot, we're creating a ReactorResourceFactory bean that's injected in WebClient instances and the Reactor Netty server. Global resources are used by default. The ReactorResourceFactory class implements the DisposableBean interface, so that the application context cleans up resources when the context is shutting down.

I've got a couple of questions regarding this new configuration option:

  1. In your opinion, is configuring the quiet period + timeout options on ReactorResourceFactory the right way to go? Those options are not available on Reactor Netty DisposableServer, so I guess this is the right place?

  2. Is there a preferred order when shutting things down between the Reactor Netty DisposableServer and LoopResources? What happens if the resources are shut before the server or vice versa?

  3. If we shut the DisposableServer down first and then the LoopResources, will the server try to clean up those resources first? In that case, we might still get the 2s quiet period by default?

bclozel

comment created time in 6 days

issue commentspring-projects/spring-framework

spring-aspects has a non-optional compile dependency on spring-orm

I've indeed checked the output of the build with and without that change and nothing changes. I guess it might have been a detail that was overlooked and just ported over when we reorganized our build.

Thanks @larsgrefer for looking into this and sorry I've bothered you for a mistake on our part!

asibross

comment created time in 6 days

push eventspring-projects/spring-framework

Brian Clozel

commit sha 9036cc689912b9a3dea8707fc5de5eb78ef4344b

Remove unnecessary dependency on spring-orm Prior to this commit, spring-aspects would consider spring-orm as a module providing aspects, which is not the case (anymore). This commit removes that dependency as a result. Fixes gh-24491

view details

push time in 6 days

issue closedspring-projects/spring-framework

spring-aspects has a non-optional compile dependency on spring-orm

Starting from version 5.2.0 spring-orm is no longer an optional dependency of spring-aspects. https://search.maven.org/artifact/org.springframework/spring-aspects/5.2.0.RELEASE/jar

This causes the below conditional to match which will then try to auto configure a data source. https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration.java#L52

Was this intentional?

<!-- !!! For Security Vulnerabilities, please go to https://pivotal.io/security !!! --> Affects: 5.2.x


<!-- Thanks for taking the time to create an issue. Please read the following:

  • Questions should be asked on Stack Overflow.
  • For bugs, specify affected versions and explain what you are trying to do.
  • For enhancements, provide context and describe the problem.

Issue or Pull Request? Create only one, not both. GitHub treats them as the same. If unsure, start with an issue, and if you submit a pull request later, the issue will be closed as superseded. -->

closed time in 6 days

asibross

issue closedspring-projects/spring-boot

Rest service in Spring Boot that invokes a storage procedure and must return response in JSON

Good afternoon, I am relatively new to spring boot, and I am working with a rest service that receives a telephone number as a parameter, and in turn in the database a stored procedure must be executed that should validate it, the same stored procedure will return A response that brings a code and response, both parameters must be presented in a json response to the request, attached example:

Input:

04258978417

Output:

{ "ValidateClient": { 
    "Body": {
         "Code": "NA22001", 
          "Message": "Fecha Maxima de asignacion del cliente.", 
             }
      }
}

ejecucion SP

The Storage Procedure is as follows:

CREATE PROCEDURE ValidacionClienteBonificado (p_movil varchar(11))
BEGIN

if exists (select '' from ClienteBonificados a where a.movil=p_movil) then
    if exists (select '' from ClienteBonificados a where a.contador=0 and a.movil=p_movil) then
        if (select a.fecha_fin<current_timestamp() from ClienteBonificados a where a.fecha_fin<current_timestamp() and a.movil=p_movil ) then
            select 'Fecha Maxima de asignacion del cliente' as result, 'NA22001' as code;
        else
            select 'Cliente aplica para bono' as result, '00000' as code;
        end if;
    else
        select 'Bono asignado a cliente' as result, 'NA22002' as code;
    end if;
else
    select 'Cliente no encontrado' as result, 'NA22003' as code;
end if;

At the moment I am creating the entity, but I have doubts how to place the output parameters, according to what I have investigated, since it does not return anything related to the parameters of the table:

table ClienteBonificados(
id int auto_increment primary key,
movil varchar(11) not null,
contador char(1) not null,
fecha_driver datetime,
fecha_alta datetime,
fecha_fin datetime,
codigo_transaccion varchar(5)
)

Then my code:

package com.app.validacion.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedStoredProcedureQueries;
import javax.persistence.NamedStoredProcedureQuery;
import javax.persistence.ParameterMode;
import javax.persistence.StoredProcedureParameter;
import javax.persistence.Table;

@Entity
@Table
@NamedStoredProcedureQueries({
    @NamedStoredProcedureQuery(
            name="ProcedueValidationCliente",
            procedureName="ValidacionClienteBonificado",
            parameters = {
                    @StoredProcedureParameter(mode=ParameterMode.IN, name="p_movil",type=String.class), 
                    @StoredProcedureParameter(mode=ParameterMode.OUT, name="result",type=String.class),
                    @StoredProcedureParameter(mode=ParameterMode.OUT, name="code",type=String.class),
            })

})
public class DriverBonificados {

    @Id
    private int id;
    private String movil;
    private String contador;
    private Date fecha_driver;
    private Date fecha_alta;
    private Date fecha_fin;
    private Date codigo_transaccion;

}

In this case the response of the database would go within the configuration of @NamedStoredProcedueQueries?

I have doubts on how to build my DAO / Repository, since I have done it, but with an answer related to the object or entity of the database

closed time in 6 days

cesarjv

issue commentspring-projects/spring-boot

Rest service in Spring Boot that invokes a storage procedure and must return response in JSON

Thanks for getting in touch, but it feels like this is a question that would be better suited to StackOverflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

cesarjv

comment created time in 6 days

issue commentspring-projects/spring-framework

spring-aspects has a non-optional compile dependency on spring-orm

Hey @larsgrefer, previously "spring-aspects" had an optional dependency on "spring-orm" (see the POM in 5.1.13.RELEASE and now it seems we're publishing this module with a hard dependency on "spring-orm".

Do you know if we can change the "aspect" configuration so that it does not leak as a transitive dependency for that module? I know how to remove the node from our published POM, but that won't solve the issue once we're publishing Gradle metadata.

Thanks!

asibross

comment created time in 6 days

issue closedspring-projects/spring-boot

Clear ProducesRequestCondition cache attribute in EndpointHandlerMapping infrastructure

<!-- Thanks for raising a Spring Boot issue. Please take the time to review the following categories as some of them do not apply here.

🙅 "Please DO NOT Raise an Issue" Cases

  • Question STOP!! Please ask questions about how to use something, or to understand why something isn't working as you expect it to, on Stack Overflow using the spring-boot tag.
  • Security Vulnerability STOP!! Please don't raise security vulnerabilities here. Head over to https://pivotal.io/security to learn how to disclose them responsibly.
  • Managed Dependency Upgrade You DO NOT need to raise an issue for a managed dependency version upgrade as there's a semi-automatic process for checking managed dependencies for new versions before a release. BUT pull requests for upgrades that are more involved than just a version property change are still most welcome.
  • With an Immediate Pull Request An issue will be closed as a duplicate of the immediate pull request, so you don't have to raise an issue if you plan to create a pull request immediately.

🐞 Bug report (please don't include this emoji/text, just add your details) Please provide details of the problem, including the version of Spring Boot that you are using. If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it.

🎁 Enhancement (please don't include this emoji/text, just add your details) Please start by describing the problem that you are trying to solve. There may already be a solution, or there may be a way to solve it that you hadn't considered.

TIP: You can always edit your issue if it isn't formatted correctly. See https://guides.github.com/features/mastering-markdown -->

Due to the optimization of ProducesRequestCondition, HandlerMapping caches MediaTypesAttribute. However, WebFluxEndpointHandlerMapping and CloudFoundryWebFluxEndpointHandlerMapping do not delete the cached MediaTypesAttribute and affect the resolution of MediaTypes of other HandlerMappings. ( On the other hand, the class that inherits RequestMappingHandlerMapping deletes the cache.)

These issues are occurring not only in Spring Webflux's HandlerMapping but also in Spring MVC's HandlerMapping.

To solve this problem, I think you need one of the following measures: Add a process to delete the cache at the end of HandlerMapping to AbstractWebFluxEndpointHandlerMapping and AbstractWebMvcEndpointHandlerMapping. Move the process of deleting the cache at the end of HandlerMapping from RequestMappingHandlerMapping to RequestMappingInfoHandlerMapping of the parent class.

If my proposed solution is correct, I am ready to create a PR.

Related URL

  • https://github.com/spring-projects/spring-framework/issues/23091
  • https://github.com/spring-projects/spring-framework/commit/0757eaee9deab3c75229c91cf0a6999b9bb563e9

closed time in 6 days

ykoyano

issue commentspring-projects/spring-boot

Clear ProducesRequestCondition cache attribute in EndpointHandlerMapping infrastructure

Thanks @ykoyano for your contribution - your analysis is spot on and your use case helped triaging this issue!

ykoyano

comment created time in 6 days

push eventspring-projects/spring-boot

Brian Clozel

commit sha e59d3fbb861560de372f8bd186e199f0c7d5e42a

Clear ProducesRequestCondition cache attribute As of spring-projects/spring-framework#22644, Spring Framework caches the "produces" condition when matching for endpoints in the `HandlerMapping` infrastructure. This has been improved in spring-projects/spring-framework#23091 to prevent side-effects in other implementations. Prior to this commit, the Spring Boot actuator infrastructure for `EndpointHandlerMapping` would not clear the cached attribute, presenting the same issue as Spring Framework's infrastructure. This means that a custom arrangement with custom `HandlerMapping` or `ContentTypeResolver` would not work properly and reuse the cached produced conditions for other, unintented, parts of the handler mapping process. This commit clears the cached data and ensures that other handler mapping implementations are free of that side-effect. Fixes gh-20150

view details

push time in 6 days

issue commentspring-projects/spring-boot

Add configuration property for Reactor Netty shutdown quiet period

@Lacritz we need to address spring-projects/spring-framework#24538 first.

bclozel

comment created time in 6 days

issue openedspring-projects/spring-framework

Configure quiet period for shutting down Netty resources

As of reactor/reactor-netty#860, Reactor Netty allows to configure the quiet period when disposing of the Netty resources.

We should expose this as an option in ReactorResourceFactory, as the default quiet period of 2 seconds can be a problem in test suites or while developing an application (e.g. Spring Boot devtools).

created time in 6 days

push eventspring-io/sagan

Brian Clozel

commit sha ff914205be860689f11d07051c27ce7654f2ac4d

Write project icon URLs with resource handling support

view details

Brian Clozel

commit sha 855de786a1c3ac6be2759f3292588c201c799168

Change order of fields in project admin form

view details

push time in 6 days

PR closed spring-io/sagan

Reviewers
Fixed a typo in the support page
+1 -1

1 comment

1 changed file

benwilcock

pr closed time in 6 days

pull request commentspring-io/sagan

Fixed a typo in the support page

Merged with 549ca12b89f83c5baf0f4

benwilcock

comment created time in 6 days

push eventspring-io/sagan

Ben Wilcock

commit sha 549ca12b89f83c5baf0f482b8f21a4d3f6d62802

fixed typo on the support page (US english preferred)

view details

push time in 6 days

issue commentspring-projects/spring-boot

Investigate liveness and readiness support for Kubernetes

Nothing beats feedback and actual experience, so we're going to implement a first version of this with:

  • Probes will ship with Actuator
  • Spring Boot will not enable by default a liveness probe. As an opt-in feature, it should be using the ping endpoint provided by Actuator. Besides a working server, Spring Boot doesn't know enough about internal application state to have opinions about this.
  • We will provide a readyness probe with an ApplicationReadyHealthIndicator that by default looks for ApplicationReadyEvent and ContextClosedEvent to change the state of the probe. Developers will be able to create their own instance and configure the event types to look for.
  • This readyness health indicator should not be part of the default global health status; if it did, there would be no way to differentiate the application not accepting traffic from an unhealthy application (some platforms might just kill the app as a result).

This first step heavily relies on the existing Actuator infrastructure; the only missing piece is whether we can easily exclude this new indicator from the default group.

With our current understanding, this approach has a few advantages:

  • reusing existing infrastructure
  • flexible, can be combined with other health endpoints
  • can be enabled only on k8s platforms
  • it's under the "/actuator" URL namespace, so it won't clash with other endpoints

There are some issues as well:

  • those probes are part of the actuator child application context and don't share 100% of the main application infrastructure. So the main app might fail and the probe would still keep working
  • it requires actuator and arguably this should be core to all Spring Boot applications

After experimenting with this and getting feedback from the community, we will improve/reconsider this approach. We could make it independent of Actuator. This requires more design, more infrastructure (MVC, WebFlux, Jersey, etc) and a separate URL path which might clash with existing routes.

@matthyx we're also wondering about the following:

  1. are there conventions around the actual URL paths for those probes? (names, regrouped under a single path segment like /probes?)
  2. are there security considerations around exposing such probes? Does k8s route external requests to probes or should they be protected from Internet traffic? How?
  3. you were mentioning Readyness as a way to get some breathing space for the application and "avoid overfilling queues". Are you thinking about messaging queues, HTTP server connection queues, threadpools, all of the above? We would like some pointers to other libraries docs about the features they provide for this.
snicoll

comment created time in 9 days

PR closed spring-io/sagan

Reviewers
Fixes the issue in the quickstart

The issue that affects the layout of highlighted words in the code such as @RestController being split onto multiple lines.

+5 -5

1 comment

2 changed files

benwilcock

pr closed time in 9 days

pull request commentspring-io/sagan

Fixes the issue in the quickstart

Merged with ab2c14cb0c4fad1d350ed3

benwilcock

comment created time in 9 days

push eventspring-io/sagan

Ben Wilcock

commit sha ab2c14cb0c4fad1d350ed3905132f1773b4b9bd3

fixed the issue with the layout of code highlights in the quickstart guide

view details

Brian Clozel

commit sha d9e8ae7d73f44676cf4c076287ed1bf9e6462b2d

Simplify quickstart CLI commands

view details

push time in 9 days

push eventspring-io/sagan

Damien Vitrac

commit sha 869f43d72cd132d522257b57a16daf895482a5e2

Update illustration on why spring page

view details

Damien Vitrac

commit sha b01ef542f7eb1830306c4228ef74b5d910694976

Improve blog styles

view details

push time in 9 days

PR merged spring-io/sagan

Feedback fixes
+1507 -1477

0 comment

4 changed files

oodamien

pr closed time in 9 days

push eventspring-io/sagan

Ben Wilcock

commit sha 81d447c6ea3eeedb1545c92329158cc65c1d2589

changed the order of the projects in the dropdown, so cloud comes before data flow

view details

push time in 9 days

PR merged spring-io/sagan

Reviewers
changed the order of the projects in the dropdown

So Spring Cloud comes before Spring Cloud Data Flow. Feels more logical.

+3 -3

0 comment

1 changed file

benwilcock

pr closed time in 9 days

push eventspring-io/sagan

Brian Clozel

commit sha dbdca9dc74a92402181df683b980b0f3ba53cb8d

Fix manifest and favicon URLs in layout template URLs were relative, which breaks those links for many pages within the website.

view details

push time in 9 days

push eventspring-io/sagan

Brian Clozel

commit sha 0f7fb1fc689f77ce8cbc4317375739ad4a0e656f

Reinstate Google Tag manager

view details

push time in 9 days

push eventspring-io/sagan

Brian Clozel

commit sha 366c34e5c13c246b1017c8632c13752034a30044

Remove previous sagan client

view details

Brian Clozel

commit sha 266d6d02fd5b09a170a930dd2f04b9073679b0a0

Add new Sagan client application This commit brings the new JavaScript files and static resources for the client application. Everything is bundled and optimized with a webpack build. The Gradle build is triggering the NPM toolchain and packaging the sagan-client module as a JAR.

view details

Brian Clozel

commit sha 47cda8e35589f1489e96a2829c282d456c502603

Remove /questions pages The Spring forums have been closed for quite a while now, and the Spring community has adopted StackOverflow for questions. We can now remove this page.

view details

Brian Clozel

commit sha 2b7d04662bdad33876bfbcc4f390f28ed07e7595

Add new static pages and change base layout This commit adds new static pages to the applications and chages the base layout to adopt the new style.

view details

Brian Clozel

commit sha e852cbd02a1eb478ce65f65d8b8c1bc195dabae4

Add project groups and featured projects This commit updates the Project model to add: * project groups, which is a way to categorize projects with themes * featured projects, to highlight particular projects on the website

view details

Brian Clozel

commit sha 9f1cb2a6770f81bdc60642b6af6530a67701098c

Update blog pages

view details

Brian Clozel

commit sha 0378006864a7457bf10f736d31b3927741e4ea81

Update getting started guide pages

view details

Brian Clozel

commit sha 9d597c6b58b5cd077421ed0b2f4d3f1f80f28f00

Update project pages

view details

Brian Clozel

commit sha 4da89065cf1d62f7304196e0dd8394c9c0f0caa0

Update tools pages

view details

Brian Clozel

commit sha e432158483d93ad89330955ee137b9e49c128509

Update team pages

view details

Brian Clozel

commit sha 0dd51ba41b23dd8b9d5dbd96bb4fd08518ca429b

Update 404 page

view details

Brian Clozel

commit sha 560ba2151c7672a686ba3a0885f9a5e825b94e50

Add "learn" page

view details

Brian Clozel

commit sha 0c62621c0844fe0a8763526aa602f0a61d352057

Rework fixtures for local development When running the application locally, an additional migration script is applied to the database to introduce fixtures: a test user, blog posts, a few projects. This allows to test the application locally with some data.

view details

Brian Clozel

commit sha 48931c8d04c9012c0a909f82518b9d6c143312d7

Add calendar support on events and community pages

view details

Brian Clozel

commit sha eafedaa1916331cf0c7291e4ed257c8fd3c0dc0a

Fix URL rewrite rule for Youtube videos

view details

Brian Clozel

commit sha cbb2fba24d998cbbbd0283b79a4329da672202e7

Rewrite admin UI

view details

Brian Clozel

commit sha f243b3825726bdcdfc4a35e503594590d9b82b91

Update team and profile pages

view details

Brian Clozel

commit sha c46a9ce9ed5bc6ddd2ae70022654570f5b65a258

Temporarily disable search

view details

Brian Clozel

commit sha 2d8cf3b530255a993afbf1783c057e299fce7cf6

Update trademarks page

view details

Damien Vitrac

commit sha 920b19a7932266ae96e550119ed3792c364bed83

Project page: fix tabs

view details

push time in 9 days

issue closedspring-projects/spring-framework

"Status and headers already sent" ISE exception from Reactor Netty on WebSocket upgrade

  • Spring Boot 2.2.4.RELEASE + webflux

From the server log I quite often see this nasty exception. We are mixing Weblux + Websockets

java.lang.IllegalStateException: Status and headers already sent
	at reactor.netty.http.server.HttpServerOperations.addHeader(HttpServerOperations.java:192) ~[reactor-netty-0.9.4.RELEASE.jar:0.9.4.RELEASE]
	at org.springframework.http.server.reactive.ReactorServerHttpResponse.applyCookies(ReactorServerHttpResponse.java:97) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.http.server.reactive.AbstractServerHttpResponse.lambda$doCommit$11(AbstractServerHttpResponse.java:238) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at reactor.core.publisher.MonoRunnable.subscribe(MonoRunnable.java:49) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4105) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.onComplete(FluxConcatArray.java:207) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxConcatArray.subscribe(FluxConcatArray.java:80) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFromFluxOperator.subscribe(MonoFromFluxOperator.java:72) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:153) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.ignoreDone(MonoIgnoreThen.java:190) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreInner.onComplete(MonoIgnoreThen.java:240) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:1871) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoPeekTerminal$MonoTerminalPeekSubscriber.onComplete(MonoPeekTerminal.java:292) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:1871) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:1871) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:1871) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:1871) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onComplete(FluxOnAssembly.java:395) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:189) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMap$FlatMapInner.onComplete(MonoFlatMap.java:260) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onComplete(FluxOnAssembly.java:395) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onComplete(FluxContextStart.java:122) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onComplete(FluxOnAssembly.java:395) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onComplete(FluxOnAssembly.java:395) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onComplete(FluxContextStart.java:122) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onComplete(FluxOnAssembly.java:395) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onComplete(MonoFlatMap.java:174) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FluxSwitchIfEmpty.java:78) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:144) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.ignoreDone(MonoIgnoreThen.java:190) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreInner.onComplete(MonoIgnoreThen.java:240) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onComplete(FluxOnAssembly.java:395) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:189) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMap$FlatMapInner.onComplete(MonoFlatMap.java:260) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onComplete(FluxContextStart.java:122) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onComplete(FluxOnAssembly.java:395) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onComplete(FluxOnAssembly.java:395) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:189) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMap$FlatMapInner.onComplete(MonoFlatMap.java:260) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onComplete(FluxOnAssembly.java:395) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onComplete(MonoFlatMap.java:174) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onComplete(MonoFlatMap.java:174) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:136) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FluxSwitchIfEmpty.java:78) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:144) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.ignoreDone(MonoIgnoreThen.java:190) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreInner.onComplete(MonoIgnoreThen.java:240) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onComplete(FluxOnAssembly.java:395) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:1871) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onComplete(FluxOnAssembly.java:395) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FluxSwitchIfEmpty.java:78) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onComplete(MonoFlatMap.java:174) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:189) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMap$FlatMapInner.onComplete(MonoFlatMap.java:260) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:144) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.ignoreDone(MonoIgnoreThen.java:190) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreInner.onComplete(MonoIgnoreThen.java:240) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:137) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxDoOnEach$DoOnEachSubscriber.onComplete(FluxDoOnEach.java:209) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.netty.FutureMono$FutureSubscription.operationComplete(FutureMono.java:188) ~[reactor-netty-0.9.4.RELEASE.jar:0.9.4.RELEASE]
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:570) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:549) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:615) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:604) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.DefaultPromise.setSuccess(DefaultPromise.java:96) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.DefaultChannelPromise.setSuccess(DefaultChannelPromise.java:78) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.DefaultChannelPromise.setSuccess(DefaultChannelPromise.java:73) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker$1.operationComplete(WebSocketServerHandshaker.java:227) ~[netty-codec-http-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker$1.operationComplete(WebSocketServerHandshaker.java:221) ~[netty-codec-http-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:551) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:615) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:604) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.internal.PromiseNotificationUtil.trySuccess(PromiseNotificationUtil.java:48) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.ChannelOutboundBuffer.safeSuccess(ChannelOutboundBuffer.java:717) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.ChannelOutboundBuffer.remove(ChannelOutboundBuffer.java:272) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.ChannelOutboundBuffer.removeBytes(ChannelOutboundBuffer.java:352) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.epoll.AbstractEpollChannel.doWriteBytes(AbstractEpollChannel.java:363) ~[netty-transport-native-epoll-4.1.45.Final-linux-x86_64.jar:4.1.45.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel.writeBytes(AbstractEpollStreamChannel.java:260) ~[netty-transport-native-epoll-4.1.45.Final-linux-x86_64.jar:4.1.45.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel.doWriteSingle(AbstractEpollStreamChannel.java:471) ~[netty-transport-native-epoll-4.1.45.Final-linux-x86_64.jar:4.1.45.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel.doWrite(AbstractEpollStreamChannel.java:429) ~[netty-transport-native-epoll-4.1.45.Final-linux-x86_64.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:930) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.flush0(AbstractEpollChannel.java:519) ~[netty-transport-native-epoll-4.1.45.Final-linux-x86_64.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:897) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1372) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:748) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:740) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:726) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.flush(CombinedChannelDuplexHandler.java:531) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:125) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.CombinedChannelDuplexHandler.flush(CombinedChannelDuplexHandler.java:356) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:748) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:763) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1089) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:384) ~[netty-transport-native-epoll-4.1.45.Final-linux-x86_64.jar:4.1.45.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]```

My websocket configuration:

@Configuration
public class ReactiveWebSocketConfiguration {

    private final WebSocketHandler webSocketHandler;

    public ReactiveWebSocketConfiguration(@Qualifier("ReactiveWebSocketHandler") WebSocketHandler webSocketHandler) {
        this.webSocketHandler = webSocketHandler;
    }

    @Bean
    public HandlerMapping webSocketHandlerMapping() {
        Map<String, WebSocketHandler> map = new HashMap<>();
        map.put("/event-emitter", webSocketHandler);

        SimpleUrlHandlerMapping handlerMapping = new SimpleUrlHandlerMapping();
        handlerMapping.setOrder(1);
        handlerMapping.setUrlMap(map);
        return handlerMapping;
    }

    @Bean
    public WebSocketHandlerAdapter handlerAdapter() {
        return new WebSocketHandlerAdapter();
    }
}
@Component("ReactiveWebSocketHandler")
public class ReactiveWebSocketHandler implements WebSocketHandler {

    final DataService dataService;

    public ReactiveWebSocketHandler(DataService dataService) {
        this.dataService = dataService;
    }

    @Override
    public Mono<Void> handle(WebSocketSession webSocketSession) {
        return webSocketSession.send(dataService.getEventFlux()
          .map(webSocketSession::textMessage))
          .and(webSocketSession.receive()
            .map(WebSocketMessage::getPayloadAsText).log());
    }
}

DataService is providing text String.

Browser side:

function connectEvents() {

    function createWebSocket(path) {
        var protocolPrefix = (window.location.protocol === 'https:') ? 'wss:' : 'ws:';
        return new WebSocket(protocolPrefix + '//' + location.host + path);
    }

    var clientWebSocket = createWebSocket(location.pathname + 'event-emitter');

    clientWebSocket.onopen = function () {
        console.log("clientWebSocket.onopen", clientWebSocket);
        console.log("clientWebSocket.readyState", "websocketstatus");
        clientWebSocket.send("event-me-from-browser");
    };
    clientWebSocket.onclose = function (event) {
        console.log("clientWebSocket.onclose", clientWebSocket, event);

        console.log('Socket is closed. Reconnect will be attempted in 10 seconds.', event ? event.reason: '');
        setTimeout(function() {
            console.log('10s websocket reconnecting');
            connectEvents();
        }, 10000);
    };
    clientWebSocket.onerror = function (event) {
        console.log("clientWebSocket.onerror", clientWebSocket, event);
    };
    clientWebSocket.onmessage = function (event) {
        console.log("clientWebSocket.onmessage", clientWebSocket, event);
        processEvents(JSON.parse(event.data));
    };

}

$(function () {
    connectEvents();
});

It's difficult to debug - maybe it's related to cookies somehow(last 2 methods in the exception). Let me know If I can provide more information.

closed time in 10 days

Vity01

push eventspring-projects/spring-framework

Brian Clozel

commit sha 13f23dc32ba0f17cc6d26e068c09e0b2578c6ffc

Mark response as complete before WebSocket upgrade Prior to this commit, some WebSocket `RequestUpgradeStrategy` reactive implementations would prevent the application from writing HTTP headers and cookies to the response. For Reactor Netty and Undertow, handling the upgrade and starting the WebSocket communication marks the response status and headers as sent and the application cannot update HTTP response headers after that. This commit ensures that the `RequestUpgradeStrategy` implementations mark the responses as "complete", so that headers are written before we delegate to the server implementation. Fixes gh-24475

view details

push time in 10 days

issue closedspring-projects/spring-boot

Devtools always triggers restart if build with gradle

Spring Boot version: 2.2.4.RELEASE Gradle version: 6.0.1 Clean project created inside IntelliJ IDEA (2019.3) via the initializr., with the devtools dependency added.

The devtools docs state that a restart only occurs on some classpath changes. Especially following paths are excluded by default: /META-INF/maven,/META-INF/resources,/resources,/static,/public,/templates and should not trigger a restart but should reload.

When using the default settings of IntelliJ and running the application via its internal run configuration the build process is delegated to gradle. Thus everything related to processing resources, running annotation processors and compiling java classes is delegated to the gradle process. Now the infuriating things are happening: Even when modifying an excluded file, like templates/index.html the whole application restarts. It seems like, gradle is always copying ALL resources to the output (build) directory and so the devtools file change listener registers them as "modified" but they are not.

Using the Update action inside IntelliJ does not help. Even using the trigger file method will always result in a complete restart. Using update resources does not help either. See the jetbrains docs for more information.

I do not know, if this is fixable with an gradle option or if the devtools need an more sophisticated process to detect changes. It seems it only compares filesize, and timestamp of files.

Simple demo app, created with the initializr: demo_app.zip

closed time in 10 days

Dazzel

issue commentspring-projects/spring-boot

Devtools always triggers restart if build with gradle

I'll close this issue for now as I don't see how we could improve the situation in Spring Boot. We can of course reopen it if anybody has a workaround/improvement idea for devtools here.

Dazzel

comment created time in 10 days

issue commentspring-projects/spring-boot

Upgrade to Tomcat 9.0.31

Another new failure on SslConnectorCustomizerTests.customizeWhenSslStoreProviderProvidesOnlyTrustStoreShouldUseDefaultKeystore() with:

SEVERE: Failed to initialize component [Connector[HTTP/1.1-auto-1]]
org.apache.catalina.LifecycleException: Protocol handler initialization failed
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:1013)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:533)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1057)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:467)
	at org.springframework.boot.web.embedded.tomcat.SslConnectorCustomizerTests.customizeWhenSslStoreProviderProvidesOnlyTrustStoreShouldUseDefaultKeystore(SslConnectorCustomizerTests.java:153)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:205)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:201)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
Caused by: java.lang.IllegalArgumentException: /Users/bclozel/.keystore (No such file or directory)
	at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:99)
	at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71)
	at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:217)
	at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1141)
	at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1154)
	at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:581)
	at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:74)
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:1010)
	... 71 more
Caused by: java.io.FileNotFoundException: /Users/bclozel/.keystore (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at java.io.FileInputStream.<init>(FileInputStream.java:93)
	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
	at org.apache.catalina.startup.CatalinaBaseConfigurationSource.getResource(CatalinaBaseConfigurationSource.java:116)
	at org.apache.tomcat.util.net.SSLUtilBase.getStore(SSLUtilBase.java:198)
	at org.apache.tomcat.util.net.SSLHostConfigCertificate.getCertificateKeystore(SSLHostConfigCertificate.java:206)
	at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:283)
	at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:247)
	at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:97)
	... 78 more
snicoll

comment created time in 10 days

issue commentspring-projects/spring-boot

Devtools always triggers restart if build with gradle

I've reproduced this issue. IDEA indeed delegates this task to Gradle directly by calling the :processResources task on the project. Gradle's ProcessResources task is quite straightforward: it cleans completely the output of the previous task run and processes all resources.

I guess this task could be improved and its incremental support could be more fine-grained, but I think that:

  • it might not have been raised to the Gradle team (at least I couldn't find an instance of this issue in their tracker)
  • processing resources implies annotation processors, and resource filtering so this might more complex than we think

I don't know how the process detecting changes for devtools could be made more sophisticated. Filesize and timestamps are already quite advanced, and I fear that trying to do more without participating in the build itself is not the right path.

I believe that reaching out to the Gradle team for this might be the best option. Could you create an issue for that and point back here for context?

Dazzel

comment created time in 10 days

fork bclozel/gradle

Adaptable, fast automation for all

https://gradle.org

fork in 10 days

issue commentspring-projects/spring-boot

Side effects of ProducesRequestCondition by WebFluxEndpointHandlerMapping

Hello @ykoyano

I can see how we might need to align here with Spring Framework - but the issue you've created only mentions the solution but not the actual problem. Did your application fail because of this problem? What was the problem, what were you trying to do and what was the expected behavior?

We need this type of information to properly triage this issue and assign the fix to a milestone.

ykoyano

comment created time in 10 days

issue commentspring-projects/spring-boot

Add actuator specific ObjectMapper

I've just closed this issue, opting for an Actuator-specific ObjectMapper instance. This instance is used for Spring MVC, Spring WebFlux, JMX and Jersey - Actuator endpoints.

The JSON mapper becomes now an implementation detail of Actuator. Jackson was already a hard dependency, but this time the mapper is totally independent from the rest of the application.

This has the following advantages:

  • changing the application JSON serialization configuration won't have any effect on Actuator JSON responses (= they'll be consistent across applications)
  • in the future, Spring Boot might choose another JSON mapper or different defaults for that without any effect on the application itself (see #13766)
  • we don't need to annotate classes to ensure that the response format will be consistent
  • using the Gson mapper in the application (i.e. adding the library as a dependency and using "spring.mvc.converters.preferred-json-mapper:gson") now works. It was previously failing on the /actuator/beans endpoint

There are some downsides to that approach.

First, we're making #1789 because we now have 3 ObjectMapper instances in a typical web application with Actuator: one for the application, one for Actuator endpoints, and another one specifically for the config properties endpoint (as we have very specific constraints for serializing those).

Also, this ObjectMapper instance only comes into play when the Actuator-specific media types are used (such as "application/vnd.spring-boot.actuator.v3+json"). Of the client explicitly asks for "application/json", the application's ObjectMapper might be used in this case and the proper serialization is not guaranteed anymore.

vilhelm-persson-viper

comment created time in 11 days

issue commentspring-projects/spring-boot

Provide support for actuators and /error rendering with Gson

We've just fixed #12951, so as of Spring Boot 2.3, an application can choose Gson as a preferred JSON mapper and not risk Actuator endpoint responses being broken.

dsyer

comment created time in 11 days

issue closedspring-projects/spring-boot

Add actuator specific ObjectMapper

When using a custom object mapper with MapperFeature.AUTO_DETECT_GETTERS disabled the detailed information for Health endpoint is not returned.

The status is returned as expected but not the detailed information.

From the code the getStatus method has Jackson annotation but the getDetails is lacking annotation.

Problem found using SpringBoot spring-boot-starter-parent version 2.0.1.RELEASE.

As a workaround and for verification of the problem is related to Jackson an MixIn class where created annotation for getStatus and getDetails and after that the information where displayed as expected.

mapper.addMixIn(Health.class, HealthMixIn.class);
public abstract class HealthMixIn {
  @JsonValue public abstract Object getStatus();
  @JsonValue public abstract Object getDetails();
}

How to repeat:

@Bean
@Primary
public ObjectMapper create() {
    ObjectMapper mapper = new ObjectMapper();
    mapper.disable(MapperFeature.AUTO_DETECT_GETTERS)
    return mapper;
}

closed time in 11 days

vilhelm-persson-viper

push eventspring-projects/spring-boot

Brian Clozel

commit sha 97af0b2f3a0a39c0eeebbbf0f7a514db1d35eac3

Add actuator specific ObjectMapper Prior to this commit, Actuator endpoints would use the application ObjectMapper instance for serializing payloads as JSON. This was problematic in several cases: * application-specific configuration would change the actuator endpoint output. * choosing a different JSON mapper implementation in the application would break completely some endpoints. Spring Boot Actuator already has a hard dependency on Jackson, and this commit uses that fact to configure a shared `ObjectMapper` instance that will be used by the Actuator infrastructure consistently, without polluting the application context. This `ObjectMapper` is used in Actuator for: * JMX endpoints * Spring MVC endpoints with an HTTP message converter * Spring WebFlux endpoints with an `Encoder` * Jersey endpoints with a `ContextResolver<ObjectMapper>` For all web endpoints, this configuration is limited to the actuator-specific media types such as `"application/vnd.spring-boot.actuator.v3+json"`. Fixes gh-12951

view details

push time in 11 days

PR closed spring-io/sagan

Reviewers
Changed the Stream link to quickstart & homepage news headlines.

Changed a link in the Event Driven page to one preferred by the team (the Stream quickstart in docs). Changed the homepage news headlines.

+3 -3

1 comment

2 changed files

benwilcock

pr closed time in 11 days

pull request commentspring-io/sagan

Changed the Stream link to quickstart & homepage news headlines.

Merged with e6a586e3e9b78b3fd0

benwilcock

comment created time in 11 days

push eventspring-io/sagan

Ben Wilcock

commit sha e6a586e3e9b78b3fd02ab1a98861b5c4838b2896

changed the Stream link in the Event Driven topic page and changed news headlines in the homepage

view details

push time in 11 days

issue closedspring-gradle-plugins/propdeps-plugin

Missing http to https redirect 403 Fordibben

Captura de pantalla de 2020-01-16 10-16-34

I have to change the buildscript:

repositories { ... maven { url "https://repo.spring.io/plugins-release" } } And then works fine.

closed time in 11 days

nachozullo

issue commentspring-gradle-plugins/propdeps-plugin

Missing http to https redirect 403 Fordibben

It's by design, see: https://spring.io/blog/2019/06/10/announcing-nohttp

nachozullo

comment created time in 11 days

push eventspring-io/sagan

Brian Clozel

commit sha 6ccfc5dff5a94abe6e957cfafd263702d743874b

Fix off-by-one dates on events pages

view details

push time in 12 days

push eventspring-io/sagan

Brian Clozel

commit sha 281fa120bc625b2b61eb3903072dd10dbbb29e95

Fix off-by-one dates on events pages

view details

push time in 12 days

push eventbclozel/spring-boot

Brian Clozel

commit sha fb5cca3a53a07ea15a19824032406f225135b744

WIP Fixes gh-

view details

push time in 12 days

create barnchbclozel/spring-boot

branch : gh-12951

created branch time in 12 days

PR closed spring-io/sagan

Reviewers
refresh blogs pages

refreshing the blogs listing index page and single blog show page.

+8338 -10525

0 comment

348 changed files

Haybu

pr closed time in 13 days

pull request commentspring-io/sagan

Changes requested by EDU for the Training and Certification copy.

Merged with 9d2e9dae16c91b4e98a6

benwilcock

comment created time in 13 days

push eventspring-io/sagan

Ben Wilcock

commit sha 9d2e9dae16c91b4e98a61117b432a426c55ebc59

changes to the training and certification copy

view details

push time in 13 days

issue commentspring-projects/spring-boot

Automatically add additional Link Builder beans to thymeleaf template engine

Injecting ordered link builders makes sense if it's a common use case to have several components like this in the application.

Looking at SO question, I don't think you need to override the templating engine bean, but something like the following should work and is more concise:

public class CustomLinkBuilder implements BeanPostProcessor {

	@Override
	public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
		if (bean instanceof SpringTemplateEngine) {
			((SpringTemplateEngine)bean).addLinkBuilder(new PathVariableLocaleLinkBuilder());
		}
		return bean;
	}
}

I'm closing this issue for now and we'll reconsider it if it appears that more applications have this need. Thanks!

dtrunk90

comment created time in 13 days

more