mirror of https://github.com/dapr/java-sdk.git
				
				
				
			[Docs] Add input bindings section (#776)
* add input bindings to java doc Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com> * add missing code Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com> Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
This commit is contained in:
		
							parent
							
								
									bbb6a1d9c0
								
							
						
					
					
						commit
						44f80c956d
					
				|  | @ -207,8 +207,30 @@ try (DaprClient client = (new DaprClientBuilder()).build()) { | |||
| } | ||||
| ``` | ||||
| 
 | ||||
| - For a full guide on output bindings visit [How-To: Use bindings]({{< ref howto-bindings.md >}}). | ||||
| - Visit [Java SDK examples](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/bindings/http) for code samples and instructions to try out output bindings | ||||
| - For a full guide on output bindings visit [How-To: Output bindings]({{< ref howto-bindings.md >}}). | ||||
| - Visit [Java SDK examples](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/bindings/http) for code samples and instructions to try out output bindings. | ||||
| 
 | ||||
| ### Interact with input bindings | ||||
| 
 | ||||
| ```java | ||||
| import org.springframework.web.bind.annotation.*; | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
| 
 | ||||
| @RestController | ||||
| @RequestMapping("/") | ||||
| public class myClass { | ||||
|     private static final Logger log = LoggerFactory.getLogger(myClass); | ||||
|         @PostMapping(path = "/checkout") | ||||
|         public Mono<String> getCheckout(@RequestBody(required = false) byte[] body) { | ||||
|             return Mono.fromRunnable(() -> | ||||
|                     log.info("Received Message: " + new String(body))); | ||||
|         } | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| - For a full guide on input bindings, visit [How-To: Input bindings]({{< ref howto-triggers >}}). | ||||
| - Visit [Java SDK examples](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/bindings/http) for code samples and instructions to try out input bindings. | ||||
| 
 | ||||
| ### Retrieve secrets | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue