language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | spring-projects | spring-framework | f46520e6e8e70e59ad46bc31debdfd155cf943bc.json | Add Jackson Smile support to WebFlux
This binary format more efficient than JSON should be useful for server
to server communication, for example in micro-services use cases.
Issue: SPR-15424 | spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileEncoder.java | @@ -0,0 +1,56 @@
+/*
+ * Copyright 2002-2017 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ ... | true |
Other | spring-projects | spring-framework | f46520e6e8e70e59ad46bc31debdfd155cf943bc.json | Add Jackson Smile support to WebFlux
This binary format more efficient than JSON should be useful for server
to server communication, for example in micro-services use cases.
Issue: SPR-15424 | spring-web/src/test/java/org/springframework/http/codec/ClientCodecConfigurerTests.java | @@ -40,6 +40,8 @@
import org.springframework.http.MediaType;
import org.springframework.http.codec.json.Jackson2JsonDecoder;
import org.springframework.http.codec.json.Jackson2JsonEncoder;
+import org.springframework.http.codec.json.Jackson2SmileDecoder;
+import org.springframework.http.codec.json.Jackson2SmileEncod... | true |
Other | spring-projects | spring-framework | f46520e6e8e70e59ad46bc31debdfd155cf943bc.json | Add Jackson Smile support to WebFlux
This binary format more efficient than JSON should be useful for server
to server communication, for example in micro-services use cases.
Issue: SPR-15424 | spring-web/src/test/java/org/springframework/http/codec/CodecConfigurerTests.java | @@ -35,6 +35,8 @@
import org.springframework.http.MediaType;
import org.springframework.http.codec.json.Jackson2JsonDecoder;
import org.springframework.http.codec.json.Jackson2JsonEncoder;
+import org.springframework.http.codec.json.Jackson2SmileDecoder;
+import org.springframework.http.codec.json.Jackson2SmileEncod... | true |
Other | spring-projects | spring-framework | f46520e6e8e70e59ad46bc31debdfd155cf943bc.json | Add Jackson Smile support to WebFlux
This binary format more efficient than JSON should be useful for server
to server communication, for example in micro-services use cases.
Issue: SPR-15424 | spring-web/src/test/java/org/springframework/http/codec/ServerCodecConfigurerTests.java | @@ -41,6 +41,8 @@
import org.springframework.http.MediaType;
import org.springframework.http.codec.json.Jackson2JsonDecoder;
import org.springframework.http.codec.json.Jackson2JsonEncoder;
+import org.springframework.http.codec.json.Jackson2SmileDecoder;
+import org.springframework.http.codec.json.Jackson2SmileEncod... | true |
Other | spring-projects | spring-framework | f46520e6e8e70e59ad46bc31debdfd155cf943bc.json | Add Jackson Smile support to WebFlux
This binary format more efficient than JSON should be useful for server
to server communication, for example in micro-services use cases.
Issue: SPR-15424 | spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java | @@ -0,0 +1,118 @@
+/*
+ * Copyright 2002-2017 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | f46520e6e8e70e59ad46bc31debdfd155cf943bc.json | Add Jackson Smile support to WebFlux
This binary format more efficient than JSON should be useful for server
to server communication, for example in micro-services use cases.
Issue: SPR-15424 | spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java | @@ -0,0 +1,126 @@
+/*
+ * Copyright 2002-2017 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | f46520e6e8e70e59ad46bc31debdfd155cf943bc.json | Add Jackson Smile support to WebFlux
This binary format more efficient than JSON should be useful for server
to server communication, for example in micro-services use cases.
Issue: SPR-15424 | spring-webflux/src/test/java/org/springframework/web/reactive/config/DelegatingWebFluxConfigurationTests.java | @@ -97,7 +97,7 @@ public void requestMappingHandlerAdapter() throws Exception {
verify(webFluxConfigurer).configureArgumentResolvers(any());
assertSame(formatterRegistry.getValue(), initializerConversionService);
- assertEquals(11, codecsConfigurer.getValue().getReaders().size());
+ assertEquals(12, codecsCon... | true |
Other | spring-projects | spring-framework | f46520e6e8e70e59ad46bc31debdfd155cf943bc.json | Add Jackson Smile support to WebFlux
This binary format more efficient than JSON should be useful for server
to server communication, for example in micro-services use cases.
Issue: SPR-15424 | spring-webflux/src/test/java/org/springframework/web/reactive/config/WebFluxConfigurationSupportTests.java | @@ -138,7 +138,7 @@ public void requestMappingHandlerAdapter() throws Exception {
assertNotNull(adapter);
List<HttpMessageReader<?>> readers = adapter.getMessageCodecConfigurer().getReaders();
- assertEquals(11, readers.size());
+ assertEquals(12, readers.size());
assertHasMessageReader(readers, forClass... | true |
Other | spring-projects | spring-framework | ed5cc27f7bf09b395af2471f62cc068afe27383f.json | Support empty body without content type in WebFlux
Issue: SPR-15758 | spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/AbstractMessageReaderArgumentResolver.java | @@ -18,8 +18,10 @@
import java.lang.annotation.Annotation;
import java.util.Collections;
+import java.util.EnumSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.stream.Collectors;
import reactor.core.publisher.Flux;
@@ -32,6 +34,8 @@
import org.springframework.core.Res... | true |
Other | spring-projects | spring-framework | ed5cc27f7bf09b395af2471f62cc068afe27383f.json | Support empty body without content type in WebFlux
Issue: SPR-15758 | spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageReaderArgumentResolverTests.java | @@ -83,14 +83,16 @@ public void setup() throws Exception {
}
+ @SuppressWarnings("unchecked")
@Test
public void missingContentType() throws Exception {
ServerWebExchange exchange = post("/path").body("{\"bar\":\"BARBAR\",\"foo\":\"FOOFOO\"}").toExchange();
ResolvableType type = forClassWithGenerics(Mono... | true |
Other | spring-projects | spring-framework | ed5cc27f7bf09b395af2471f62cc068afe27383f.json | Support empty body without content type in WebFlux
Issue: SPR-15758 | spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestBodyArgumentResolverTests.java | @@ -19,6 +19,7 @@
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.CompletableFuture;
import io.reactivex.Maybe;
@@ -106,6 +107,14 @@ public void emptyBodyWithStringNotRequired() throws Exception {
assertNull(body);
}
+ @Test ... | true |
Other | spring-projects | spring-framework | 03b409f891f8ae3e2e22fc347695d07211cf5b8e.json | Use dedicated addAdvisors
See gh-1469 | spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java | @@ -458,10 +458,9 @@ protected Object createProxy(Class<?> beanClass, @Nullable String beanName,
}
Advisor[] advisors = buildAdvisors(beanName, specificInterceptors);
- for (Advisor advisor : advisors) {
- proxyFactory.addAdvisor(advisor);
- }
-
+
+ proxyFactory.addAdvisors(advisors);
+
proxyFactory... | false |
Other | spring-projects | spring-framework | d6c102d1b89b374e637639453d57c97b0f3f42b3.json | Add apply method to WebClient.Builder
This commit introduces an apply method to `WebClient.Builder`, allowing
users to make multiple changes to the builder in one consumer.
Issue: SPR-15743 | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClientBuilder.java | @@ -256,4 +256,12 @@ public WebClient.Builder clone() {
return new DefaultWebClientBuilder(this);
}
+ @Override
+ public WebClient.Builder apply(Consumer<WebClient.Builder> builderConsumer) {
+ Assert.notNull(builderConsumer, "'builderConsumer' must not be null");
+
+ builderConsumer.accept(this);
+ return th... | true |
Other | spring-projects | spring-framework | d6c102d1b89b374e637639453d57c97b0f3f42b3.json | Add apply method to WebClient.Builder
This commit introduces an apply method to `WebClient.Builder`, allowing
users to make multiple changes to the builder in one consumer.
Issue: SPR-15743 | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java | @@ -302,14 +302,20 @@ interface Builder {
Builder exchangeFunction(ExchangeFunction exchangeFunction);
/**
- * Builder the {@link WebClient} instance.
+ * Clone this {@code WebClient.Builder}
*/
- WebClient build();
+ Builder clone();
/**
- * Clone this {@code WebClient.Builder}
+ * Shortcut ... | true |
Other | spring-projects | spring-framework | d6c102d1b89b374e637639453d57c97b0f3f42b3.json | Add apply method to WebClient.Builder
This commit introduces an apply method to `WebClient.Builder`, allowing
users to make multiple changes to the builder in one consumer.
Issue: SPR-15743 | spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultWebClientTests.java | @@ -157,6 +157,19 @@ public void attributes() {
client.get().uri("/path").attribute("foo", "bar").exchange();
}
+ @Test
+ public void apply() {
+ WebClient client = builder()
+ .apply(builder -> builder.defaultHeader("Accept", "application/json").defaultCookie("id", "123"))
+ .build();
+ client.get().ur... | true |
Other | spring-projects | spring-framework | 9ac71afbdaa3e9364680b0e396a27b36229e4220.json | Fix one failing test and @Ignore another
The failures look like older failures possibly exposed by recent
changes in Reactor.
The one in ViewResolutionResultHandler is very old test error.
The one in Jackson2JsonDecoderTests is more recent but went unreported. | spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java | @@ -20,6 +20,7 @@
import java.util.Map;
import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Ignore;
import org.junit.Test;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -117,10 +118,8 @@ public void decodeToFlux() throws Exception {
@Test
public void decodeEmpty... | true |
Other | spring-projects | spring-framework | 9ac71afbdaa3e9364680b0e396a27b36229e4220.json | Fix one failing test and @Ignore another
The failures look like older failures possibly exposed by recent
changes in Reactor.
The one in ViewResolutionResultHandler is very old test error.
The one in Jackson2JsonDecoderTests is more recent but went unreported. | spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java | @@ -240,7 +240,7 @@ public void unresolvedViewName() throws Exception {
StepVerifier.create(mono)
.expectNextCount(0)
- .expectErrorMessage("Could not resolve view with name 'account'.")
+ .expectErrorMessage("Could not resolve view with name 'path'.")
.verify();
}
| true |
Other | spring-projects | spring-framework | fbcd554f428c8c5233db550463d0aeaded98fc91.json | Fix method order in ChannelSendOperator
1. Group by contract
2. Follow lifecycle -- Subscriber 1st, Subscription 2nd, Publisher last
3. Order of declaration in implemented contracts | spring-web/src/main/java/org/springframework/http/server/reactive/ChannelSendOperator.java | @@ -119,41 +119,47 @@ private final class WriteWithBarrier
}
- @Override
- public void cancel() {
- Subscription s = this.subscription;
- if (s != null) {
- this.subscription = null;
- s.cancel();
- }
- }
+ // CoreSubscriber<T> methods (we're the subscriber to the write source)..
@Override
-... | false |
Other | spring-projects | spring-framework | 134ceac58e80c8f345e2a2946be8ce5291b60672.json | Set all strategies in CNM factory bean
ContentNegotiationManagerFactoryBean now provides an option to
explicitly set the strategies to use vs customizing a fixed
list of default strategies.
Issue: SPR-11114 | spring-web/src/main/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBean.java | @@ -36,9 +36,14 @@
/**
* Factory to create a {@code ContentNegotiationManager} and configure it with
- * one or more {@link ContentNegotiationStrategy} instances via simple setters.
- * The following table shows setters, resulting strategy instances, and if in
- * use by default:
+ * one or more {@link ContentNego... | true |
Other | spring-projects | spring-framework | 134ceac58e80c8f345e2a2946be8ce5291b60672.json | Set all strategies in CNM factory bean
ContentNegotiationManagerFactoryBean now provides an option to
explicitly set the strategies to use vs customizing a fixed
list of default strategies.
Issue: SPR-11114 | spring-web/src/test/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBeanTests.java | @@ -89,6 +89,25 @@ public void defaultSettings() throws Exception {
Collections.singletonList(MediaType.IMAGE_GIF), manager.resolveMediaTypes(this.webRequest));
}
+ @Test
+ public void explicitStrategies() throws Exception {
+ Map<String, MediaType> mediaTypes = Collections.singletonMap("bar", new MediaType("... | true |
Other | spring-projects | spring-framework | 134ceac58e80c8f345e2a2946be8ce5291b60672.json | Set all strategies in CNM factory bean
ContentNegotiationManagerFactoryBean now provides an option to
explicitly set the strategies to use vs customizing a fixed
list of default strategies.
Issue: SPR-11114 | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurer.java | @@ -18,6 +18,7 @@
import java.util.Arrays;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import javax.servlet.ServletContext;
@@ -34,9 +35,14 @@
/**
* Creates a {@code ContentNegotiationManager} and configures it with
- * one or more {@link ContentNegotiationStrategy} instances. T... | true |
Other | spring-projects | spring-framework | 134ceac58e80c8f345e2a2946be8ce5291b60672.json | Set all strategies in CNM factory bean
ContentNegotiationManagerFactoryBean now provides an option to
explicitly set the strategies to use vs customizing a fixed
list of default strategies.
Issue: SPR-11114 | src/docs/asciidoc/web/web-mvc.adoc | @@ -5198,10 +5198,14 @@ And in XML use the `<mvc:interceptors>` element:
[[mvc-config-content-negotiation]]
=== Content Negotiation
You can configure how Spring MVC determines the requested media types from the request.
-The available options are to check the URL path for a file extension, check the
-"Accept" header... | true |
Other | spring-projects | spring-framework | c93792b8c9e5ecea45c739cf8bc3df40ec3e297a.json | Allow custom separator in PathContainer | spring-web/src/main/java/org/springframework/http/server/reactive/DefaultPathContainer.java | @@ -17,6 +17,7 @@
package org.springframework.http.server.reactive;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -89,54 +90,56 @@ public String toString() {
}
- static PathContainer createFrom... | true |
Other | spring-projects | spring-framework | c93792b8c9e5ecea45c739cf8bc3df40ec3e297a.json | Allow custom separator in PathContainer | spring-web/src/main/java/org/springframework/http/server/reactive/PathContainer.java | @@ -16,7 +16,6 @@
package org.springframework.http.server.reactive;
-import java.nio.charset.StandardCharsets;
import java.util.List;
import org.springframework.util.MultiValueMap;
@@ -77,7 +76,18 @@ default PathContainer subPath(int startIndex, int endIndex) {
* @return the parsed path
*/
static PathC... | true |
Other | spring-projects | spring-framework | e4588628491889369119d73e801bdd7481ae13d3.json | Reflect recent Reactor changes | spring-web/src/main/java/org/springframework/http/server/reactive/ChannelSendOperator.java | @@ -21,11 +21,11 @@
import org.reactivestreams.Publisher;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
+import reactor.core.CoreSubscriber;
import reactor.core.Scannable;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Opera... | false |
Other | spring-projects | spring-framework | 3dd6069578a2aea3f87bcfeec10d9156e038c4f5.json | Add UTF8 problem+json media type constant
Issue: SPR-15742 | spring-web/src/main/java/org/springframework/http/MediaType.java | @@ -276,6 +276,19 @@ public class MediaType extends MimeType implements Serializable {
* @since 5.0
*/
public final static String APPLICATION_PROBLEM_JSON_VALUE = "application/problem+json";
+
+ /**
+ * Public constant media type for {@code application/problem+json}.
+ * @since 5.0
+ * @see <a href="https:/... | false |
Other | spring-projects | spring-framework | 4e95378fc636687a5b4275a2101f0ba4520b0aff.json | Remove unused imports | spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java | @@ -22,7 +22,6 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
-import java.util.logging.Level;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -33,16 +32,15 @@
import reactor.core.publisher.Mono;
import reactor.core.pu... | false |
Other | spring-projects | spring-framework | 802a4c6d02ebee9b29447f47a739021555757ecf.json | Remove unnecessary "method" in reference manual (#1166)
From context, It seems that the first word "method" is needless, | src/asciidoc/web-mvc.adoc | @@ -565,7 +565,7 @@ snippet:
You use the `@RequestMapping` annotation to map URLs such as `/appointments` onto an
entire class or a particular handler method. Typically the class-level annotation maps a
specific request path (or path pattern) onto a form controller, with additional
-method-level annotations narrowin... | false |
Other | spring-projects | spring-framework | d51005fbbeaf6e84f94a2f9d491d705119898572.json | Improve Encoder Javadoc | spring-core/src/main/java/org/springframework/core/codec/Encoder.java | @@ -20,6 +20,7 @@
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
import org.springframework.core.ResolvableType;
import org.springframework.core.io.buffer.DataBuffer;
@@ -50,7 +51,9 @@
/**
* Encode a stream of Objects of type {@code T} into a ... | false |
Other | spring-projects | spring-framework | d1f60e3de185458021b23f540a5e5cc07176d11c.json | Fix default encoding in CONTRIBUTING documentation
Sources should be using UTF-8.
Issue: SPR-14674 | CONTRIBUTING.md | @@ -74,15 +74,14 @@ present in the framework.
1. Preserve existing formatting; i.e. do not reformat code for its own sake
1. Search the codebase using `git grep` and other tools to discover common
naming conventions, etc.
-1. Latin-1 (ISO-8859-1) encoding for Java sources; use `native2ascii` to convert
- if n... | false |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-web-reactive/src/main/java/org/springframework/web/reactive/resource/EncodedResource.java | @@ -1,43 +0,0 @@
-/*
- * Copyright 2002-2015 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- ... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-web-reactive/src/main/java/org/springframework/web/reactive/resource/GzipResourceResolver.java | @@ -25,6 +25,7 @@
import org.springframework.core.io.AbstractResource;
import org.springframework.core.io.Resource;
+import org.springframework.http.HttpHeaders;
import org.springframework.web.server.ServerWebExchange;
/**
@@ -74,7 +75,7 @@ protected String resolveUrlPathInternal(String resourceUrlPath, List<? ... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-web-reactive/src/main/java/org/springframework/web/reactive/resource/ResolvedResource.java | @@ -0,0 +1,27 @@
+package org.springframework.web.reactive.resource;
+
+import org.springframework.core.io.Resource;
+import org.springframework.http.HttpHeaders;
+
+/**
+ * Interface for resources resolved through the
+ * {@link org.springframework.web.reactive.resource.ResourceResolverChain}
+ * that may contribute H... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-web-reactive/src/main/java/org/springframework/web/reactive/resource/ResourceWebHandler.java | @@ -482,11 +482,9 @@ protected void setHeaders(ServerWebExchange exchange, Resource resource, MediaTy
if (mediaType != null) {
headers.setContentType(mediaType);
}
- if (resource instanceof EncodedResource) {
- headers.set(HttpHeaders.CONTENT_ENCODING, ((EncodedResource) resource).getContentEncoding());
- ... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-web-reactive/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java | @@ -31,6 +31,7 @@
import org.springframework.core.io.AbstractResource;
import org.springframework.core.io.Resource;
+import org.springframework.http.HttpHeaders;
import org.springframework.util.AntPathMatcher;
import org.springframework.util.StringUtils;
import org.springframework.web.server.ServerWebExchange;
@... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-web-reactive/src/main/java/org/springframework/web/reactive/resource/VersionedResource.java | @@ -1,34 +0,0 @@
-/*
- * Copyright 2002-2016 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- ... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-web-reactive/src/test/java/org/springframework/web/reactive/resource/GzipResourceResolverTests.java | @@ -123,8 +123,8 @@ public void resolveGzippedFile() throws IOException {
Resource resource = new ClassPathResource("test/" + gzFile, getClass());
assertEquals(resource.getDescription(), resolved.getDescription());
assertEquals(new ClassPathResource("test/" + file).getFilename(), resolved.getFilename());
- as... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-web-reactive/src/test/java/org/springframework/web/reactive/resource/VersionResourceResolverTests.java | @@ -163,8 +163,8 @@ public void resolveResourceSuccess() throws Exception {
Resource actual = this.resolver.resolveResourceInternal(exchange, versionFile, this.locations, this.chain);
assertEquals(expected.getFilename(), actual.getFilename());
verify(this.versionStrategy, times(1)).getResourceVersion(expected)... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/EncodedResource.java | @@ -1,43 +0,0 @@
-/*
- * Copyright 2002-2015 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- ... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/GzipResourceResolver.java | @@ -22,10 +22,12 @@
import java.net.URI;
import java.net.URL;
import java.util.List;
+
import javax.servlet.http.HttpServletRequest;
import org.springframework.core.io.AbstractResource;
import org.springframework.core.io.Resource;
+import org.springframework.http.HttpHeaders;
/**
* A {@code ResourceResolve... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResolvedResource.java | @@ -0,0 +1,27 @@
+package org.springframework.web.servlet.resource;
+
+import org.springframework.core.io.Resource;
+import org.springframework.http.HttpHeaders;
+
+/**
+ * Interface for resources resolved through the
+ * {@link org.springframework.web.servlet.resource.ResourceResolverChain}
+ * that may contribute HTT... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java | @@ -542,11 +542,10 @@ protected void setHeaders(HttpServletResponse response, Resource resource, Media
if (mediaType != null) {
response.setContentType(mediaType.toString());
}
- if (resource instanceof EncodedResource) {
- response.setHeader(HttpHeaders.CONTENT_ENCODING, ((EncodedResource) resource).getCo... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java | @@ -32,6 +32,7 @@
import org.springframework.core.io.AbstractResource;
import org.springframework.core.io.Resource;
+import org.springframework.http.HttpHeaders;
import org.springframework.util.AntPathMatcher;
import org.springframework.util.StringUtils;
@@ -238,7 +239,7 @@ protected VersionStrategy getStrategy... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionedResource.java | @@ -1,33 +0,0 @@
-/*
- * Copyright 2002-2016 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- ... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-webmvc/src/test/java/org/springframework/web/servlet/resource/GzipResourceResolverTests.java | @@ -111,8 +111,8 @@ public void resolveGzippedFile() throws IOException {
Resource resource = new ClassPathResource("test/"+gzFile, getClass());
assertEquals(resource.getDescription(), resolved.getDescription());
assertEquals(new ClassPathResource("test/" + file).getFilename(), resolved.getFilename());
- asse... | true |
Other | spring-projects | spring-framework | ccb3c44dbcd4ab4741aec7b366ed43efa2f90b44.json | Add ResolvedResource in resource handling chain
Prior to this commit, the resource handling chain and its
`ResourceResolvers` would use specific `Resource` implementations in
order to add resource metadata to the HTTP response. For example,
`VersionedResource` and `EncodedResource` are both adding specific HTTP
respon... | spring-webmvc/src/test/java/org/springframework/web/servlet/resource/VersionResourceResolverTests.java | @@ -150,8 +150,8 @@ public void resolveResourceSuccess() throws Exception {
Resource actual = this.resolver.resolveResourceInternal(request, versionFile, this.locations, this.chain);
assertEquals(expected.getFilename(), actual.getFilename());
verify(this.versionStrategy, times(1)).getResourceVersion(expected);... | true |
Other | spring-projects | spring-framework | 72e4fac28d59ed5db3e81efe01ccbcc3a8311dbf.json | Fix missing resources in GzipResourceResolverTests | spring-web-reactive/src/test/java/org/springframework/web/reactive/resource/GzipResourceResolverTests.java | @@ -16,8 +16,12 @@
package org.springframework.web.reactive.resource;
+import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.... | true |
Other | spring-projects | spring-framework | 72e4fac28d59ed5db3e81efe01ccbcc3a8311dbf.json | Fix missing resources in GzipResourceResolverTests | spring-webmvc/src/test/java/org/springframework/web/servlet/resource/GzipResourceResolverTests.java | @@ -16,8 +16,12 @@
package org.springframework.web.servlet.resource;
+import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.L... | true |
Other | spring-projects | spring-framework | c813405ca35a44d22bbddf3121dd48150cbe1b95.json | Add @since tags | spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpRequest.java | @@ -35,6 +35,7 @@
/**
* Mock implementation of {@link ServerHttpRequest}.
* @author Rossen Stoyanchev
+ * @since 5.0
*/
public class MockServerHttpRequest implements ServerHttpRequest {
| true |
Other | spring-projects | spring-framework | c813405ca35a44d22bbddf3121dd48150cbe1b95.json | Add @since tags | spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpResponse.java | @@ -35,6 +35,7 @@
/**
* Mock implementation of {@link ServerHttpResponse}.
* @author Rossen Stoyanchev
+ * @since 5.0
*/
public class MockServerHttpResponse implements ServerHttpResponse {
| true |
Other | spring-projects | spring-framework | a1ac51256a96360c63e26a556cd84133f840dfb8.json | Add MockServerHttpRequest/Response to spring-test
Issue: SPR-14421 | build.gradle | @@ -1016,6 +1016,8 @@ project("spring-test") {
}
optional("org.skyscreamer:jsonassert:1.3.0")
optional("com.jayway.jsonpath:json-path:2.2.0")
+ optional("org.reactivestreams:reactive-streams:${reactivestreamsVersion}")
+ optional("io.projectreactor:reactor-core:${reactorCoreVersion}")
testCompile(project(... | true |
Other | spring-projects | spring-framework | a1ac51256a96360c63e26a556cd84133f840dfb8.json | Add MockServerHttpRequest/Response to spring-test
Issue: SPR-14421 | spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpRequest.java | @@ -0,0 +1,155 @@
+/*
+ * Copyright 2002-2016 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | a1ac51256a96360c63e26a556cd84133f840dfb8.json | Add MockServerHttpRequest/Response to spring-test
Issue: SPR-14421 | spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpResponse.java | @@ -0,0 +1,108 @@
+/*
+ * Copyright 2002-2016 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | a1ac51256a96360c63e26a556cd84133f840dfb8.json | Add MockServerHttpRequest/Response to spring-test
Issue: SPR-14421 | spring-test/src/main/java/org/springframework/mock/http/server/reactive/package-info.java | @@ -0,0 +1,4 @@
+/**
+ * Mock implementations of reactive HTTP server contracts.
+ */
+package org.springframework.mock.http.server.reactive; | true |
Other | spring-projects | spring-framework | a1ac51256a96360c63e26a556cd84133f840dfb8.json | Add MockServerHttpRequest/Response to spring-test
Issue: SPR-14421 | spring-web/src/test/java/org/springframework/mock/http/server/reactive/test/MockServerHttpRequest.java | @@ -32,7 +32,6 @@
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
-
/**
* Mock implementation of {@link ServerHttpRequest}.
* @author Rossen Stoyanchev | true |
Other | spring-projects | spring-framework | f3dd554dbeb7261f908007ca8cdd1af2aa33ba33.json | Fix typos in docs and polish | src/asciidoc/web-reactive.adoc | @@ -203,17 +203,19 @@ HttpServlet servlet = new ServletHttpHandlerAdapter(httpHandler);
...
// Reactor Netty
-HttpServer server = HttpServer.create(host, port)
-server.startAndAwait(new ServletHttpHandlerAdapter(httpHandler));
+ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(httpHandler);
+HttpSer... | false |
Other | spring-projects | spring-framework | 7788879c5a6fa69de935a1e045fe1ab657b9dc2e.json | Remove stray `
Remove stray ` in import-into-idea.md | import-into-idea.md | @@ -11,7 +11,7 @@ _Within your locally cloned spring-framework working directory:_
## Known issues
-1. `spring-core` and ``spring-oxm` should be pre-compiled due to repackaged dependencies.
+1. `spring-core` and `spring-oxm` should be pre-compiled due to repackaged dependencies.
See `*RepackJar` tasks in the buil... | false |
Other | spring-projects | spring-framework | 068151925503e6124eb85158d137779e925f4a38.json | Add checkNotModified support for view resolution
Issue: SPR-14522 | spring-web-reactive/src/main/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandler.java | @@ -230,6 +230,9 @@ private boolean isViewNameOrReference(ResolvableType elementType, HandlerResult
}
private Mono<Object> getDefaultViewNameMono(ServerWebExchange exchange, HandlerResult result) {
+ if (exchange.isNotModified()) {
+ return Mono.empty();
+ }
String defaultViewName = getDefaultViewName(resu... | true |
Other | spring-projects | spring-framework | 068151925503e6124eb85158d137779e925f4a38.json | Add checkNotModified support for view resolution
Issue: SPR-14522 | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/AbstractRequestMappingIntegrationTests.java | @@ -56,6 +56,10 @@ ApplicationContext getApplicationContext() {
return this.applicationContext;
}
+ RestTemplate getRestTemplate() {
+ return this.restTemplate;
+ }
+
<T> ResponseEntity<T> performGet(String url, MediaType out,
Class<T> type) throws Exception { | true |
Other | spring-projects | spring-framework | 068151925503e6124eb85158d137779e925f4a38.json | Add checkNotModified support for view resolution
Issue: SPR-14522 | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingViewResolutionIntegrationTests.java | @@ -16,23 +16,32 @@
package org.springframework.web.reactive.result.method.annotation;
+import java.net.URI;
+import java.util.Optional;
+
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org... | true |
Other | spring-projects | spring-framework | 068151925503e6124eb85158d137779e925f4a38.json | Add checkNotModified support for view resolution
Issue: SPR-14522 | spring-web/src/main/java/org/springframework/web/server/ServerWebExchange.java | @@ -68,6 +68,12 @@ public interface ServerWebExchange {
*/
Mono<WebSession> getSession();
+ /**
+ * Returns {@code true} if the one of the {@code checkNotModified} methods
+ * in this contract were used and they returned true.
+ */
+ boolean isNotModified();
+
/**
* An overloaded variant of {@link #check... | true |
Other | spring-projects | spring-framework | 068151925503e6124eb85158d137779e925f4a38.json | Add checkNotModified support for view resolution
Issue: SPR-14522 | spring-web/src/main/java/org/springframework/web/server/adapter/DefaultServerWebExchange.java | @@ -104,6 +104,11 @@ public Mono<WebSession> getSession() {
return this.sessionMono;
}
+ @Override
+ public boolean isNotModified() {
+ return this.notModified;
+ }
+
@Override
public boolean checkNotModified(Instant lastModified) {
return checkNotModified(null, lastModified); | true |
Other | spring-projects | spring-framework | 6071e01168fe9ee5006cab09c632b19fca1fc359.json | Add checkNotModified support in ServerWebExchange
Issue: SPR-14522 | spring-web/src/main/java/org/springframework/web/server/ServerWebExchange.java | @@ -16,6 +16,7 @@
package org.springframework.web.server;
+import java.time.Instant;
import java.util.Map;
import java.util.Optional;
@@ -67,4 +68,42 @@ public interface ServerWebExchange {
*/
Mono<WebSession> getSession();
+ /**
+ * An overloaded variant of {@link #checkNotModified(String, Instant)} w... | true |
Other | spring-projects | spring-framework | 6071e01168fe9ee5006cab09c632b19fca1fc359.json | Add checkNotModified support in ServerWebExchange
Issue: SPR-14522 | spring-web/src/main/java/org/springframework/web/server/adapter/DefaultServerWebExchange.java | @@ -16,15 +16,23 @@
package org.springframework.web.server.adapter;
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
+import java.util.Arrays;
+import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import reactor.core.publisher... | true |
Other | spring-projects | spring-framework | 6071e01168fe9ee5006cab09c632b19fca1fc359.json | Add checkNotModified support in ServerWebExchange
Issue: SPR-14522 | spring-web/src/test/java/org/springframework/web/server/adapter/DefaultServerWebExchangeCheckNotModifiedTests.java | @@ -0,0 +1,332 @@
+/*
+ * Copyright 2002-2016 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ ... | true |
Other | spring-projects | spring-framework | 638e6cc7f8f817b0271711a5ee48dbba8b58a7e0.json | Add checkNotModified support for ResponseEntity
Issue: SPR-14522 | spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandler.java | @@ -15,6 +15,8 @@
*/
package org.springframework.web.reactive.result.method.annotation;
+import java.time.Instant;
+import java.util.Arrays;
import java.util.List;
import java.util.Optional;
@@ -26,6 +28,7 @@
import org.springframework.core.ResolvableType;
import org.springframework.http.HttpEntity;
import ... | true |
Other | spring-projects | spring-framework | 638e6cc7f8f817b0271711a5ee48dbba8b58a7e0.json | Add checkNotModified support for ResponseEntity
Issue: SPR-14522 | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java | @@ -19,6 +19,8 @@
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -35,6 +37,7 @@
import org.springframework.core.codec.ByteBuf... | true |
Other | spring-projects | spring-framework | 1af2fbfbbb68fda04797df666e56c1eb7dbe9da5.json | Delete unused imports in spring-context-indexer | spring-context-indexer/src/main/java/org/springframework/context/index/IndexedStereotypesProvider.java | @@ -22,8 +22,6 @@
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
-import javax.lang.model.type.DeclaredType;
-import javax.lang.model.type.TypeMirror;
/**
* A {@link StereotypesProvider} implementation that extracts the ste... | true |
Other | spring-projects | spring-framework | 1af2fbfbbb68fda04797df666e56c1eb7dbe9da5.json | Delete unused imports in spring-context-indexer | spring-context-indexer/src/test/java/org/springframework/context/index/CandidateComponentsIndexerTests.java | @@ -57,7 +57,6 @@
import org.springframework.context.index.sample.type.SpecializedRepo;
import org.springframework.context.index.test.TestCompiler;
import org.springframework.stereotype.Component;
-import org.springframework.stereotype.Repository;
import static org.hamcrest.Matchers.*;
import static org.junit.As... | true |
Other | spring-projects | spring-framework | dc3f62d576bc39c57fa40d5e25f74a645cf46d55.json | Fix class literal in instanceof
Closes gh-1151 | src/asciidoc/core-expressions.adoc | @@ -785,7 +785,7 @@ expression based `matches` operator.
----
// evaluates to false
boolean falseValue = parser.parseExpression(
- "'xyz' instanceof T(Integer.class)").getValue(Boolean.class);
+ "'xyz' instanceof T(Integer)").getValue(Boolean.class);
// evaluates to true
boolean trueValue = parser.parseE... | false |
Other | spring-projects | spring-framework | 536e72c8df7aa206bd02268e5bef939b73d5b653.json | Add WebSocket chapter to WebFlux section
Issue: SPR-15700 | spring-webflux/src/test/java/org/springframework/web/reactive/socket/AbstractWebSocketIntegrationTests.java | @@ -171,7 +171,9 @@ public WebSocketHandlerAdapter handlerAdapter() {
@Bean
public WebSocketService webSocketService() {
- return new HandshakeWebSocketService(getUpgradeStrategy());
+ TomcatRequestUpgradeStrategy strategy = new TomcatRequestUpgradeStrategy();
+ strategy.setMaxSessionIdleTimeout(0L);
+ ... | true |
Other | spring-projects | spring-framework | 536e72c8df7aa206bd02268e5bef939b73d5b653.json | Add WebSocket chapter to WebFlux section
Issue: SPR-15700 | src/docs/asciidoc/web-reactive.adoc | @@ -18,6 +18,7 @@ include::web/webflux.adoc[leveloffset=+1]
include::web/webflux-webclient.adoc[leveloffset=+1]
+include::web/webflux-websocket.adoc[leveloffset=+1]
| true |
Other | spring-projects | spring-framework | 536e72c8df7aa206bd02268e5bef939b73d5b653.json | Add WebSocket chapter to WebFlux section
Issue: SPR-15700 | src/docs/asciidoc/web/webflux-websocket.adoc | @@ -0,0 +1,167 @@
+[[webflux-websocket]]
+= WebSockets
+[.small]#<<web.adoc#websocket,Same in Servlet stack>>#
+
+This part of the reference documentation covers support for Reactive stack, WebSocket
+messaging.
+
+
+include::websocket-intro.adoc[leveloffset=+1]
+
+
+
+[[webflux-websocket-server]]
+== WebSocket API
+[.... | true |
Other | spring-projects | spring-framework | 536e72c8df7aa206bd02268e5bef939b73d5b653.json | Add WebSocket chapter to WebFlux section
Issue: SPR-15700 | src/docs/asciidoc/web/websocket.adoc | @@ -1,6 +1,7 @@
[[websocket]]
= WebSockets
:doc-spring-security: {doc-root}/spring-security/site/docs/current/reference
+[.small]#<<web-reactive.adoc#webflux-websocket,Same in Spring WebFlux>>#
This part of the reference documentation covers support for Servlet stack, WebSocket
messaging that includes raw WebSoc... | true |
Other | spring-projects | spring-framework | 5e86049438a2b82779fb0add2b6f987e2f1141e2.json | Expose WebSocket options for Tomcat/Jetty | spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/JettyRequestUpgradeStrategy.java | @@ -22,6 +22,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.eclipse.jetty.websocket.api.WebSocketPolicy;
import org.eclipse.jetty.websocket.server.WebSocketServerFactory;
import reactor.core.publisher.Mono;
@@ -41,6 +42,7 @@
import org.springframew... | true |
Other | spring-projects | spring-framework | 5e86049438a2b82779fb0add2b6f987e2f1141e2.json | Expose WebSocket options for Tomcat/Jetty | spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/TomcatRequestUpgradeStrategy.java | @@ -23,6 +23,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.websocket.Endpoint;
+import javax.websocket.server.ServerContainer;
import org.apache.tomcat.websocket.server.WsServerContainer;
import reactor.core.publisher.Mono;
@@ -52,8 +53,79 @@ publi... | true |
Other | spring-projects | spring-framework | 2be2aa7b965e217c3e8a27f5a971323d19457374.json | Add missing word to JavaDoc | spring-core/src/main/java/org/springframework/core/ReactiveTypeDescriptor.java | @@ -22,7 +22,7 @@
import org.springframework.util.Assert;
/**
- * Descriptor for a reactive type with information its stream semantics, i.e.
+ * Descriptor for a reactive type with information about its stream semantics, i.e.
* how many values it can produce.
*
* @author Rossen Stoyanchev | false |
Other | spring-projects | spring-framework | 8223809455a5eabf85321ead0df483a3f29e7755.json | Use existing CompositeByteBuf if possible
This commit uses the existing CompositeByteBuf if present, as opposed
to creating a new composite for every call to
NettyDataBuffer.write(ByteBuf...)
Issue: SPR-16180 | spring-core/src/main/java/org/springframework/core/io/buffer/NettyDataBuffer.java | @@ -208,16 +208,18 @@ public NettyDataBuffer write(ByteBuffer... buffers) {
public NettyDataBuffer write(ByteBuf... byteBufs) {
Assert.notNull(byteBufs, "'byteBufs' must not be null");
- CompositeByteBuf composite = new CompositeByteBuf(
- this.byteBuf.alloc(), this.byteBuf.isDirect(), byteBufs.length + 1);
... | false |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-web/spring-web.gradle | @@ -78,9 +78,6 @@ dependencies {
testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
testCompile("org.eclipse.jetty:jetty-server:${jettyVersion}")
testCompile("org.eclipse.jetty:jetty-servlet:${jettyVersion}")
- testCompile("io.reactivex:rxnetty-http:0.5.2") {
- exclude group: 'io.reactivex... | true |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-web/src/test/java/org/springframework/http/server/reactive/AbstractHttpHandlerIntegrationTests.java | @@ -28,7 +28,6 @@
import org.springframework.http.server.reactive.bootstrap.HttpServer;
import org.springframework.http.server.reactive.bootstrap.JettyHttpServer;
import org.springframework.http.server.reactive.bootstrap.ReactorHttpServer;
-import org.springframework.http.server.reactive.bootstrap.RxNettyHttpServer;... | true |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-web/src/test/java/org/springframework/http/server/reactive/RxNettyHttpHandlerAdapter.java | @@ -1,95 +0,0 @@
-/*
- * Copyright 2002-2017 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- ... | true |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-web/src/test/java/org/springframework/http/server/reactive/RxNettyServerHttpRequest.java | @@ -1,124 +0,0 @@
-/*
- * Copyright 2002-2017 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
-... | true |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-web/src/test/java/org/springframework/http/server/reactive/RxNettyServerHttpResponse.java | @@ -1,183 +0,0 @@
-/*
- * Copyright 2002-2017 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
-... | true |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/RxNettyHttpServer.java | @@ -1,61 +0,0 @@
-/*
- * Copyright 2002-2017 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- ... | true |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-webflux/spring-webflux.gradle | @@ -48,9 +48,6 @@ dependencies {
testCompile("org.hibernate:hibernate-validator:6.0.4.Final")
testCompile "io.reactivex.rxjava2:rxjava:${rxjava2Version}"
testCompile("io.projectreactor:reactor-test")
- testCompile("io.reactivex:rxnetty-http:0.5.2") {
- exclude group: 'io.reactivex', module: 'rxjava'
- }
testCo... | true |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-webflux/src/test/java/org/springframework/web/reactive/FlushingIntegrationTests.java | @@ -32,12 +32,10 @@
import org.springframework.http.server.reactive.HttpHandler;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.http.server.reactive.ServerHttpResponse;
-import org.springframework.http.server.reactive.bootstrap.ReactorHttpServer;
-import org.springframe... | true |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-webflux/src/test/java/org/springframework/web/reactive/socket/AbstractWebSocketIntegrationTests.java | @@ -20,6 +20,8 @@
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
+import java.util.LinkedHashMap;
+import java.util.Map;
import org.apache.tomcat.websocket.WsWebSocketContainer;
import org.apache.tomcat.websocket.server.WsContextListener;
@@ -42,13 +44,11 @@
import org.spri... | true |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java | @@ -27,7 +27,6 @@
import org.apache.commons.logging.LogFactory;
import org.hamcrest.Matchers;
import org.junit.Test;
-import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.publisher.MonoProcessor;
@@ -168,7 +167,7 @@ public List<String> g... | true |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-webflux/src/test/java/org/springframework/web/reactive/socket/adapter/RxNettyWebSocketSession.java | @@ -1,104 +0,0 @@
-/*
- * Copyright 2002-2017 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
-... | true |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-webflux/src/test/java/org/springframework/web/reactive/socket/client/RxNettyWebSocketClient.java | @@ -1,175 +0,0 @@
-/*
- * Copyright 2002-2017 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
-... | true |
Other | spring-projects | spring-framework | 807297f173255734257555d4bdb04f921f361863.json | Remove RxNetty (from test sources)
Practically no changes to RxNetty for a year and efforts underway to
rebuild 0.6.x based on a current Reactor Netty base.
Aside from the extra time to run integration tests having two
Netty-based servers can also cause false alarms such as ByteBuf leaks
related to RxNetty. | spring-webflux/src/test/java/org/springframework/web/reactive/socket/server/upgrade/RxNettyRequestUpgradeStrategy.java | @@ -1,80 +0,0 @@
-/*
- * Copyright 2002-2017 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- ... | true |
Other | spring-projects | spring-framework | 9786750b5acb151fcc845abfb2c8b8679ec44599.json | Improve @RequestAttribute WebFlux resolver
The resolver now takes into account the possibility the attribute
itself may be a reactive type.
Issue: SPR-16158 | spring-web/src/test/java/org/springframework/web/method/MvcAnnotationPredicates.java | @@ -24,6 +24,7 @@
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.MatrixVariable;
import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestBody;
i... | true |
Other | spring-projects | spring-framework | 9786750b5acb151fcc845abfb2c8b8679ec44599.json | Improve @RequestAttribute WebFlux resolver
The resolver now takes into account the possibility the attribute
itself may be a reactive type.
Issue: SPR-16158 | spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/RequestAttributeMethodArgumentResolver.java | @@ -16,8 +16,11 @@
package org.springframework.web.reactive.result.method.annotation;
+import reactor.core.publisher.Mono;
+
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.core.MethodParameter;
+import org.springframework.core.ReactiveAdapter;
import org.spri... | true |
Other | spring-projects | spring-framework | 9786750b5acb151fcc845abfb2c8b8679ec44599.json | Improve @RequestAttribute WebFlux resolver
The resolver now takes into account the possibility the attribute
itself may be a reactive type.
Issue: SPR-16158 | spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestAttributeMethodArgumentResolverTests.java | @@ -16,26 +16,24 @@
package org.springframework.web.reactive.result.method.annotation;
-import java.lang.reflect.Method;
+import java.time.Duration;
import java.util.Optional;
+import io.reactivex.Single;
import org.junit.Before;
import org.junit.Test;
import reactor.core.publisher.Mono;
import reactor.test... | true |
Other | spring-projects | spring-framework | 9fab208fdd4a311f7d3f7587ca0dd6a1aafb553f.json | Reduce access on headers for STOMP messaging
Issue: SPR-16165 | spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageHeaderAccessor.java | @@ -215,15 +215,18 @@ private StringBuilder getBaseLogMessage() {
StringBuilder sb = new StringBuilder();
SimpMessageType messageType = getMessageType();
sb.append(messageType != null ? messageType.name() : SimpMessageType.OTHER);
- if (getDestination() != null) {
- sb.append(" destination=").append(getDest... | true |
Other | spring-projects | spring-framework | 9fab208fdd4a311f7d3f7587ca0dd6a1aafb553f.json | Reduce access on headers for STOMP messaging
Issue: SPR-16165 | spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java | @@ -150,7 +150,7 @@ private Message<byte[]> decodeMessage(ByteBuffer byteBuffer, @Nullable MultiValu
if (payload.length > 0) {
StompCommand stompCommand = headerAccessor.getCommand();
if (stompCommand != null && !stompCommand.isBodyAllowed()) {
- throw new StompConversionException(headerAccessor.g... | true |
Other | spring-projects | spring-framework | 9fab208fdd4a311f7d3f7587ca0dd6a1aafb553f.json | Reduce access on headers for STOMP messaging
Issue: SPR-16165 | spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaderAccessor.java | @@ -18,6 +18,7 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
+import java.security.Principal;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -165,11 +166,13 @@ else if (StompCommand.CONNECT.equals(command)) {
}
void updateStompHeadersFromSim... | true |
Other | spring-projects | spring-framework | 9fab208fdd4a311f7d3f7587ca0dd6a1aafb553f.json | Reduce access on headers for STOMP messaging
Issue: SPR-16165 | spring-messaging/src/main/java/org/springframework/messaging/support/MessageHeaderAccessor.java | @@ -546,8 +546,9 @@ else if (payload instanceof byte[]) {
}
protected boolean isReadableContentType() {
+ MimeType contentType = getContentType();
for (MimeType mimeType : READABLE_MIME_TYPES) {
- if (mimeType.includes(getContentType())) {
+ if (mimeType.includes(contentType)) {
return true;
}
... | true |
Other | spring-projects | spring-framework | 9fab208fdd4a311f7d3f7587ca0dd6a1aafb553f.json | Reduce access on headers for STOMP messaging
Issue: SPR-16165 | spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java | @@ -268,11 +268,12 @@ else if (webSocketMessage instanceof BinaryMessage) {
logger.trace("From client: " + headerAccessor.getShortLogMessage(message.getPayload()));
}
- boolean isConnect = StompCommand.CONNECT.equals(headerAccessor.getCommand());
+ StompCommand command = headerAccessor.getCommand();
... | true |
Other | spring-projects | spring-framework | 845110aa66698cd12a77db4b352a7252328e6ef7.json | Update docs on HTTP/2 | src/docs/asciidoc/web/webflux.adoc | @@ -1446,3 +1446,19 @@ For advanced mode, remove `@EnableWebFlux` and extend directly from
You can keep existing methods in `WebConfig` but you can now also override bean declarations
from the base class and you can still have any number of other ``WebMvcConfigurer``'s on
the classpath.
+
+
+
+
+[[webflux-http2]]
+=... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.