Make spring-cloud-function-adapter-aws-web depend on base module

This commit is contained in:
Oleg Zhurakousky
2023-03-06 18:54:52 +01:00
parent dbf362b7fe
commit 0c82bca08a
12 changed files with 44 additions and 2450 deletions

View File

@@ -111,7 +111,6 @@ public class ProxyHttpServletRequest implements HttpServletRequest {
/** List of locales in descending order. */
private final LinkedList<Locale> locales = new LinkedList<>();
private boolean asyncStarted = false;
private boolean asyncSupported = false;
@@ -168,7 +167,6 @@ public class ProxyHttpServletRequest implements HttpServletRequest {
private final MultiValueMap<String, Part> parts = new LinkedMultiValueMap<>();
public ProxyHttpServletRequest(ServletContext servletContext, String method, String requestURI) {
this.servletContext = servletContext;
this.method = method;
@@ -318,11 +316,11 @@ public class ProxyHttpServletRequest implements HttpServletRequest {
@Override
public int read() throws IOException {
int readByte = stream.read();
if (readByte == -1) {
finished = true;
}
return readByte;
int readByte = stream.read();
if (readByte == -1) {
finished = true;
}
return readByte;
}
@Override

View File

@@ -41,8 +41,6 @@ import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.web.context.ConfigurableWebApplicationContext;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.context.support.GenericWebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;

View File

@@ -1,21 +1,44 @@
/*
* Copyright 2023-2023 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.function.adapter.aws.web;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.cloud.function.serverless.web.ProxyHttpServletRequest;
import org.springframework.cloud.function.serverless.web.ProxyHttpServletResponse;
import org.springframework.cloud.function.serverless.web.ProxyMvc;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import static org.assertj.core.api.Assertions.assertThat;
/**
*
* @author Oleg Zhurakousky
*
*/
public class RequestResponseTests {
private ObjectMapper mapper = new ObjectMapper();