File tree Expand file tree Collapse file tree 5 files changed +22
-8
lines changed
spring-cloud-function-kotlin
src/test/kotlin/org/springframework/cloud/function/kotlin/web
spring-cloud-function-web Expand file tree Collapse file tree 5 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 228228 <module >spring-cloud-function-adapters</module >
229229 <module >spring-cloud-function-integration</module >
230230 <!-- <module>spring-cloud-function-rsocket</module> -->
231- <!-- < module>spring-cloud-function-kotlin</module> -->
231+ <module >spring-cloud-function-kotlin</module >
232232 <module >docs</module >
233233 </modules >
234234 </profile >
Original file line number Diff line number Diff line change 8686 <artifactId >spring-boot-configuration-processor</artifactId >
8787 <optional >true</optional >
8888 </dependency >
89+ <dependency >
90+ <groupId >org.springframework.boot</groupId >
91+ <artifactId >spring-boot-resttestclient</artifactId >
92+ <scope >test</scope >
93+ </dependency >
94+
95+ <dependency >
96+ <groupId >org.springframework.boot</groupId >
97+ <artifactId >spring-boot-webmvc-test</artifactId >
98+ <scope >test</scope >
99+ </dependency >
100+ <dependency >
101+ <groupId >org.springframework.boot</groupId >
102+ <artifactId >spring-boot-webtestclient</artifactId >
103+ </dependency >
89104 </dependencies >
90105
91106 <build >
Original file line number Diff line number Diff line change @@ -21,9 +21,10 @@ import org.assertj.core.api.Assertions
2121import org.junit.jupiter.api.Test
2222import org.springframework.beans.factory.annotation.Autowired
2323import org.springframework.boot.autoconfigure.EnableAutoConfiguration
24+ import org.springframework.boot.resttestclient.TestRestTemplate
25+ import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate
2426import org.springframework.boot.test.context.SpringBootTest
2527import org.springframework.boot.test.context.SpringBootTest.WebEnvironment
26- import org.springframework.boot.web.server.test.client.TestRestTemplate
2728import org.springframework.cloud.function.web.RestApplication
2829import org.springframework.context.annotation.Bean
2930import org.springframework.http.MediaType
@@ -42,6 +43,7 @@ import java.net.URI
4243 properties = [" spring.cloud.function.web.path=/functions" , " spring.main.web-application-type=reactive" ]
4344)
4445@ContextConfiguration(classes = [RestApplication ::class , HeadersToMessageSuspendTests .TestConfiguration ::class ])
46+ @AutoConfigureTestRestTemplate
4547open class HeadersToMessageSuspendTests {
4648 @Autowired
4749 private val rest: TestRestTemplate ? = null
Original file line number Diff line number Diff line change @@ -19,9 +19,10 @@ import org.assertj.core.api.Assertions
1919import org.junit.jupiter.api.Test
2020import org.springframework.beans.factory.annotation.Autowired
2121import org.springframework.boot.autoconfigure.EnableAutoConfiguration
22+ import org.springframework.boot.resttestclient.TestRestTemplate
23+ import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate
2224import org.springframework.boot.test.context.SpringBootTest
2325import org.springframework.boot.test.context.SpringBootTest.WebEnvironment
24- import org.springframework.boot.web.server.test.client.TestRestTemplate
2526import org.springframework.cloud.function.web.RestApplication
2627import org.springframework.context.annotation.Bean
2728import org.springframework.http.MediaType
@@ -42,6 +43,7 @@ import java.net.URI
4243 properties = [" spring.cloud.function.web.path=/functions" , " spring.main.web-application-type=reactive" ]
4344)
4445@ContextConfiguration(classes = [RestApplication ::class , HeadersToMessageTests .TestConfiguration ::class ])
46+ @AutoConfigureTestRestTemplate
4547open class HeadersToMessageTests {
4648 @Autowired
4749 private val rest: TestRestTemplate ? = null
Original file line number Diff line number Diff line change 9999 <artifactId >spring-boot-resttestclient</artifactId >
100100 <scope >test</scope >
101101 </dependency >
102- <!-- <dependency>-->
103- <!-- <groupId>org.springframework.boot</groupId>-->
104- <!-- <artifactId>spring-boot-starter-restclient</artifactId>-->
105- <!-- <scope>test</scope>-->
106- <!-- </dependency>-->
107102
108103 <dependency >
109104 <groupId >org.springframework.boot</groupId >
You can’t perform that action at this time.
0 commit comments