{"id":71082,"date":"2017-12-04T10:00:50","date_gmt":"2017-12-04T08:00:50","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=71082"},"modified":"2017-12-04T09:53:30","modified_gmt":"2017-12-04T07:53:30","slug":"annotated-controllers-spring-web-webflux-testing","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html","title":{"rendered":"Annotated controllers &#8211; Spring Web\/Webflux and Testing"},"content":{"rendered":"<p><a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web-reactive.html#spring-webflux\">Spring Webflux<\/a>\u00a0and\u00a0<a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web.html#spring-web\">Spring Web<\/a>\u00a0are two entirely different web stacks.\u00a0<a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web-reactive.html#spring-webflux\">Spring Webflux<\/a>, however, continues to support an annotation-based programming model<\/p>\n<p>An endpoint defined using these two stacks may look\u00a0similar but the way to test such an endpoint is fairly different and a user writing such an endpoint has to be aware of which stack is active and formulate the test accordingly.<\/p>\n<h2>Sample Endpoint<\/h2>\n<p>Consider a sample annotation based endpoint:<\/p>\n<pre class=\"brush:java\">import org.springframework.web.bind.annotation.PostMapping\r\nimport org.springframework.web.bind.annotation.RequestBody\r\nimport org.springframework.web.bind.annotation.RequestMapping\r\nimport org.springframework.web.bind.annotation.RestController\r\n\r\n\r\ndata class Greeting(val message: String)\r\n\r\n@RestController\r\n@RequestMapping(\"\/web\")\r\nclass GreetingController {\r\n    \r\n    @PostMapping(\"\/greet\")\r\n    fun handleGreeting(@RequestBody greeting: Greeting): Greeting {\r\n        return Greeting(\"Thanks: ${greeting.message}\")\r\n    }\r\n    \r\n}<\/pre>\n<h2>Testing with Spring Web<\/h2>\n<p>If\u00a0<a href=\"http:\/\/start.spring.io\/\">Spring Boot 2 starters<\/a> were used to create this application with Spring Web as the starter, specified using a Gradle build file the following way:<\/p>\n<pre class=\"brush:java\">compile('org.springframework.boot:spring-boot-starter-web')<\/pre>\n<p>then the test of such an endpoint would be using a Mock web runtime, referred to as\u00a0<a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/testing.html#spring-mvc-test-framework\">Mock MVC<\/a>:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush:java\">import org.junit.Test\r\nimport org.junit.runner.RunWith\r\nimport org.springframework.beans.factory.annotation.Autowired\r\nimport org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest\r\nimport org.springframework.test.context.junit4.SpringRunner\r\nimport org.springframework.test.web.servlet.MockMvc\r\nimport org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post\r\nimport org.springframework.test.web.servlet.result.MockMvcResultMatchers.content\r\n\r\n\r\n@RunWith(SpringRunner::class)\r\n@WebMvcTest(GreetingController::class)\r\nclass GreetingControllerMockMvcTest {\r\n\r\n    @Autowired\r\n    lateinit var mockMvc: MockMvc\r\n\r\n    @Test\r\n    fun testHandleGreetings() {\r\n        mockMvc\r\n                .perform(\r\n                        post(\"\/web\/greet\")\r\n                                .content(\"\"\" \r\n                                |{\r\n                                |\"message\": \"Hello Web\"\r\n                                |}\r\n                            \"\"\".trimMargin())\r\n                ).andExpect(content().json(\"\"\"\r\n                    |{\r\n                    |\"message\": \"Thanks: Hello Web\"\r\n                    |}\r\n                \"\"\".trimMargin()))\r\n    }\r\n}<\/pre>\n<h2>Testing with Spring Web-Flux<\/h2>\n<p>If on the other hand Spring-Webflux starters were pulled in, say with the following Gradle dependency:<\/p>\n<pre class=\"brush:java\">compile('org.springframework.boot:spring-boot-starter-webflux')<\/pre>\n<p>then the test of this endpoint would be using the excellent\u00a0<a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/testing.html#webtestclient\">WebTestClient<\/a> class, along these lines:<\/p>\n<pre class=\"brush:java\">import org.junit.Test\r\nimport org.junit.runner.RunWith\r\nimport org.springframework.beans.factory.annotation.Autowired\r\nimport org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest\r\nimport org.springframework.http.HttpHeaders\r\nimport org.springframework.test.context.junit4.SpringRunner\r\nimport org.springframework.test.web.reactive.server.WebTestClient\r\nimport org.springframework.web.reactive.function.BodyInserters\r\n\r\n\r\n@RunWith(SpringRunner::class)\r\n@WebFluxTest(GreetingController::class)\r\nclass GreetingControllerTest {\r\n\r\n    @Autowired\r\n    lateinit var webTestClient: WebTestClient\r\n\r\n    @Test\r\n    fun testHandleGreetings() {\r\n        webTestClient.post()\r\n                .uri(\"\/web\/greet\")\r\n                .header(HttpHeaders.CONTENT_TYPE, \"application\/json\")\r\n                .body(BodyInserters\r\n                        .fromObject(\"\"\" \r\n                                |{\r\n                                |   \"message\": \"Hello Web\"\r\n                                |}\r\n                            \"\"\".trimMargin()))\r\n                .exchange()\r\n                .expectStatus().isOk\r\n                .expectBody()\r\n                .json(\"\"\"\r\n                    |{\r\n                    |   \"message\": \"Thanks: Hello Web\"\r\n                    |}\r\n                \"\"\".trimMargin())\r\n    }\r\n}<\/pre>\n<h2>Conclusion<\/h2>\n<p>It is easy to assume that since the programming model looks very similar using Spring Web and Spring Webflux stacks, that the tests for such a legacy test using Spring Web would continue over to Spring Webflux, this is however not true, as a developer we have to be mindful of the underlying stack that comes into play and formulate the test accordingly. I hope this post clarifies how such a test should be crafted.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>Published on Java Code Geeks with permission by Biju Kunjummen, partner at our <a href=\"http:\/\/www.javacodegeeks.com\/join-us\/jcg\/\" target=\"_blank\" rel=\"noopener\">JCG program<\/a>. See the original article here: <a href=\"http:\/\/www.java-allandsundry.com\/2017\/12\/annotated-controllers-spring-webflux.html\" target=\"_blank\" rel=\"noopener\">Annotated controllers &#8211; Spring Web\/Webflux and Testing<\/a><\/p>\n<p>Opinions expressed by Java Code Geeks contributors are their own.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Spring Webflux\u00a0and\u00a0Spring Web\u00a0are two entirely different web stacks.\u00a0Spring Webflux, however, continues to support an annotation-based programming model An endpoint defined using these two stacks may look\u00a0similar but the way to test such an endpoint is fairly different and a user writing such an endpoint has to be aware of which stack is active and formulate &hellip;<\/p>\n","protected":false},"author":236,"featured_media":13674,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[1208,150],"class_list":["post-71082","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-kotlin","tag-spring-mvc"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Annotated controllers - Spring Web\/Webflux and Testing - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Spring Webflux\u00a0and\u00a0Spring Web\u00a0are two entirely different web stacks.\u00a0Spring Webflux, however, continues to support an annotation-based programming model\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Annotated controllers - Spring Web\/Webflux and Testing - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Spring Webflux\u00a0and\u00a0Spring Web\u00a0are two entirely different web stacks.\u00a0Spring Webflux, however, continues to support an annotation-based programming model\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-04T08:00:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/jetbrains-kotlin-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Biju Kunjummen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Biju Kunjummen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html\"},\"author\":{\"name\":\"Biju Kunjummen\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/802eedfe6f17c3c13fa656af46b6b0e5\"},\"headline\":\"Annotated controllers &#8211; Spring Web\\\/Webflux and Testing\",\"datePublished\":\"2017-12-04T08:00:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html\"},\"wordCount\":277,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2013\\\/06\\\/jetbrains-kotlin-logo.jpg\",\"keywords\":[\"Kotlin\",\"Spring MVC\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html\",\"name\":\"Annotated controllers - Spring Web\\\/Webflux and Testing - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2013\\\/06\\\/jetbrains-kotlin-logo.jpg\",\"datePublished\":\"2017-12-04T08:00:50+00:00\",\"description\":\"Spring Webflux\u00a0and\u00a0Spring Web\u00a0are two entirely different web stacks.\u00a0Spring Webflux, however, continues to support an annotation-based programming model\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2013\\\/06\\\/jetbrains-kotlin-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2013\\\/06\\\/jetbrains-kotlin-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/12\\\/annotated-controllers-spring-web-webflux-testing.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Annotated controllers &#8211; Spring Web\\\/Webflux and Testing\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/802eedfe6f17c3c13fa656af46b6b0e5\",\"name\":\"Biju Kunjummen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g\",\"caption\":\"Biju Kunjummen\"},\"sameAs\":[\"http:\\\/\\\/biju-allandsundry.blogspot.com\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Biju-Kunjummen\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Annotated controllers - Spring Web\/Webflux and Testing - Java Code Geeks","description":"Spring Webflux\u00a0and\u00a0Spring Web\u00a0are two entirely different web stacks.\u00a0Spring Webflux, however, continues to support an annotation-based programming model","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html","og_locale":"en_US","og_type":"article","og_title":"Annotated controllers - Spring Web\/Webflux and Testing - Java Code Geeks","og_description":"Spring Webflux\u00a0and\u00a0Spring Web\u00a0are two entirely different web stacks.\u00a0Spring Webflux, however, continues to support an annotation-based programming model","og_url":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2017-12-04T08:00:50+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/jetbrains-kotlin-logo.jpg","type":"image\/jpeg"}],"author":"Biju Kunjummen","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Biju Kunjummen","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html"},"author":{"name":"Biju Kunjummen","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/802eedfe6f17c3c13fa656af46b6b0e5"},"headline":"Annotated controllers &#8211; Spring Web\/Webflux and Testing","datePublished":"2017-12-04T08:00:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html"},"wordCount":277,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/jetbrains-kotlin-logo.jpg","keywords":["Kotlin","Spring MVC"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html","url":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html","name":"Annotated controllers - Spring Web\/Webflux and Testing - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/jetbrains-kotlin-logo.jpg","datePublished":"2017-12-04T08:00:50+00:00","description":"Spring Webflux\u00a0and\u00a0Spring Web\u00a0are two entirely different web stacks.\u00a0Spring Webflux, however, continues to support an annotation-based programming model","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/jetbrains-kotlin-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/06\/jetbrains-kotlin-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2017\/12\/annotated-controllers-spring-web-webflux-testing.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Annotated controllers &#8211; Spring Web\/Webflux and Testing"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/802eedfe6f17c3c13fa656af46b6b0e5","name":"Biju Kunjummen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/66af1504c76f011746c89812efce168850f07dce91ce881e62795e10c99d30b3?s=96&d=mm&r=g","caption":"Biju Kunjummen"},"sameAs":["http:\/\/biju-allandsundry.blogspot.com"],"url":"https:\/\/www.javacodegeeks.com\/author\/Biju-Kunjummen"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/71082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/236"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=71082"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/71082\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/13674"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=71082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=71082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=71082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}