Spring Framwork Testing v5.3.36 SNAPSHOTTesting Client Applications You can use client-side tests to test code that internally uses the RestTemplate. The idea is to declare expected requests and to provide “stub” responses so that you can focus following example shows how to do so: Java RestTemplate restTemplate = new RestTemplate(); MockRestServiceServer mockServer = MockRestServiceServer.bindTo(restTemplate).build(); mockServer.expect(requestTo("/greeting")) Test code that uses the above RestTemplate ... mockServer.verify(); Kotlin val restTemplate = RestTemplate() val mockServer = MockRestServiceServer.bindTo(restTemplate).build() mockServer.expect(re0 码力 | 193 页 | 2.53 MB | 1 年前3
Spring Boot 2.0.0.M4 Reference GuideOAuth2 Authorization Server Resource Server Token Type in User Info Customizing the User Info RestTemplate Client Single Sign On Actuator Security 29. Working with SQL databases Configure a DataSource Message Receiving a Message Additional Kafka Properties 33. Calling REST services with ‘RestTemplate’ RestTemplate customization 34. Calling REST services with ‘WebClient’ WebClient customization 35 Spring MVC metrics Spring MVC metric tags WebFlux metrics WebFlux metric tags RestTemplate metrics RestTemplate metric tags 54. Auditing 55. Tracing Custom tracing 56. Process monitoring Extend0 码力 | 583 页 | 501.03 KB | 1 年前3
Spring Boot 2.0.0.M4 Reference Guide......................................................... 96 28.3. Customizing the User Info RestTemplate ........................................................... 96 Client ...................... ............ 131 33. Calling REST services with ‘RestTemplate’ ................................................................. 133 33.1. RestTemplate customization .................................. .......................... 186 53.3. RestTemplate metrics ..................................................................................... 186 RestTemplate metric tags .........................0 码力 | 364 页 | 1.92 MB | 1 年前3
Spring Framwork Integration v5.3.36 SNAPSHOT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. RestTemplate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . REST Endpoints The Spring Framework provides two choices for making calls to REST endpoints: • RestTemplate: The original Spring REST client with a synchronous, template method API. • WebClient: a non-blocking supports both synchronous and asynchronous as well as streaming scenarios. As of 5.0 the RestTemplate is in maintenance mode, with only minor requests for changes and bugs to be accepted going forward0 码力 | 141 页 | 2.13 MB | 1 年前3
Spring Framwork Web on Servlet Stack v5.3.36 SNAPSHOT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 2.1. RestTemplate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . configuration, such as a base URL, encoding preferences, and other details. You can configure RestTemplate and WebClient with a UriBuilderFactory to customize the preparation of URIs. DefaultUriBuilderFactory internally and exposes shared configuration options. The following example shows how to configure a RestTemplate: Java // import org.springframework.web.util.DefaultUriBuilderFactory.EncodingMode; String0 码力 | 259 页 | 3.58 MB | 1 年前3
Spring Boot 2.0.0.M3 Reference GuideOAuth2 Authorization Server Resource Server Token Type in User Info Customizing the User Info RestTemplate Client Single Sign On Actuator Security 29. Working with SQL databases Configure a DataSource Message Receiving a Message Additional Kafka Properties 33. Calling REST services with ‘RestTemplate’ RestTemplate customization 34. Calling REST services with ‘WebClient’ WebClient customization 35 Switch off the Default MVC configuration Customize ViewResolvers 76. HTTP clients Configure RestTemplate to use a proxy 77. Logging Configure Logback for logging Configure logback for file only output0 码力 | 590 页 | 513.07 KB | 1 年前3
Spring Boot 1.4.0.RELEASE Reference DocumentationOAuth2 Authorization Server Resource Server Token Type in User Info Customizing the User Info RestTemplate Client Single Sign On Actuator Security 29. Working with SQL databases Configure a DataSource message AMQP RabbitMQ support Sending a message Receiving a message 33. Calling REST services RestTemplate customization 34. Sending email 35. Distributed Transactions with JTA Using an Atomikos transaction MVC configuration Customize ViewResolvers Velocity Use Thymeleaf 3 73. HTTP clients Configure RestTemplate to use a proxy 74. Logging Configure Logback for logging Configure logback for file only output0 码力 | 554 页 | 493.90 KB | 1 年前3
Spring Framwork Web on Reactive Stack v5.3.36 SNAPSHOTconfiguration, such as a base URL, encoding preferences, and other details. You can configure RestTemplate and WebClient with a UriBuilderFactory to customize the preparation of URIs. DefaultUriBuilderFactory internally and exposes shared configuration options. The following example shows how to configure a RestTemplate: Java // import org.springframework.web.util.DefaultUriBuilderFactory.EncodingMode; String baseUrl); factory.setEncodingMode(EncodingMode.TEMPLATE_AND_VALUES); RestTemplate restTemplate = new RestTemplate(); restTemplate.setUriTemplateHandler(factory); Kotlin // import org.springframework0 码力 | 182 页 | 2.52 MB | 1 年前3
Spring Boot 2.0.0.M3 Reference Guide......................................................... 96 28.3. Customizing the User Info RestTemplate ........................................................... 96 Client ...................... ............ 131 33. Calling REST services with ‘RestTemplate’ ................................................................. 133 33.1. RestTemplate customization .................................. ........................................................................ 252 76.1. Configure RestTemplate to use a proxy ........................................................... 252 77. Logging ..0 码力 | 367 页 | 1.92 MB | 1 年前3
Spring Boot 1.4.x-SNAPSHOT Reference DocumentationOAuth2 Authorization Server Resource Server Token Type in User Info Customizing the User Info RestTemplate Client Single Sign On Actuator Security 29. Working with SQL databases Configure a DataSource message AMQP RabbitMQ support Sending a message Receiving a message 33. Calling REST services RestTemplate customization 34. Sending email 35. Distributed Transactions with JTA Using an Atomikos transaction MVC configuration Customize ViewResolvers Velocity Use Thymeleaf 3 72. HTTP clients Configure RestTemplate to use a proxy 73. Logging Configure Logback for logging Configure logback for file only output0 码力 | 570 页 | 508.60 KB | 1 年前3
共 253 条
- 1
- 2
- 3
- 4
- 5
- 6
- 26













