JAVA-2113: Split or move spring-resttemplate module (#9753)

* JAVA-2113: Move Proxies With RestTemplate to spring-resttemplate-2

* JAVA-2113: Move A Custom Media Type for a Spring REST API to spring-resttemplate-2

* JAVA-2113: Move RestTemplate Post Request with JSON to spring-resttemplate-2

* JAVA-2113: Move Download an Image or a File with Spring MVC to spring-boot-mvc-3

* JAVA-2113: Fix the test
This commit is contained in:
kwoyke 2020-07-28 06:01:54 +02:00 committed by GitHub
parent cc012802de
commit 0423536cf4
22 changed files with 44 additions and 8 deletions

View File

@ -5,4 +5,5 @@ This module contains articles about Spring Web MVC in Spring Boot projects.
### Relevant Articles:
- [Circular View Path Error](https://www.baeldung.com/spring-circular-view-path-error)
- [Download an Image or a File with Spring MVC](https://www.baeldung.com/spring-controller-return-image-file)
- More articles: [[prev -->]](/spring-boot-modules/spring-boot-mvc-2)

View File

@ -26,6 +26,15 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
</dependencies>
<properties>
<commons-io.version>2.7</commons-io.version>
</properties>
</project>

View File

@ -5,3 +5,6 @@ This module contains articles about Spring RestTemplate
### Relevant Articles:
- [Spring RestTemplate Request/Response Logging](https://www.baeldung.com/spring-resttemplate-logging)
- [Proxies With RestTemplate](https://www.baeldung.com/java-resttemplate-proxy)
- [A Custom Media Type for a Spring REST API](https://www.baeldung.com/spring-rest-custom-media-type)
- [RestTemplate Post Request with JSON](https://www.baeldung.com/spring-resttemplate-post-json)

View File

@ -0,0 +1,13 @@
package com.baeldung.resttemplate;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class RestTemplateConfigurationApplication {
public static void main(String[] args) {
SpringApplication.run(RestTemplateConfigurationApplication.class, args);
}
}

View File

@ -0,0 +1,17 @@
package com.baeldung.sampleapp.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
@EnableWebMvc
@ComponentScan({ "com.baeldung.sampleapp.web" })
public class WebConfig implements WebMvcConfigurer {
public WebConfig() {
super();
}
}

View File

@ -11,16 +11,11 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
- [Spring RestTemplate Error Handling](https://www.baeldung.com/spring-rest-template-error-handling)
- [Configure a RestTemplate with RestTemplateBuilder](https://www.baeldung.com/spring-rest-template-builder)
- [Mocking a RestTemplate in Spring](https://www.baeldung.com/spring-mock-rest-template)
- [RestTemplate Post Request with JSON](https://www.baeldung.com/spring-resttemplate-post-json)
- [Download a Large File Through a Spring RestTemplate](https://www.baeldung.com/spring-resttemplate-download-large-file)
- [Using the Spring RestTemplate Interceptor](https://www.baeldung.com/spring-rest-template-interceptor)
- [Uploading MultipartFile with Spring RestTemplate](https://www.baeldung.com/spring-rest-template-multipart-upload)
- [Get and Post Lists of Objects with RestTemplate](https://www.baeldung.com/spring-rest-template-list)
- [Copy of RestTemplate Post Request with JSON](https://www.baeldung.com/spring-resttemplate-post-json-test)
- [HTTP PUT vs HTTP PATCH in a REST API](https://www.baeldung.com/http-put-patch-difference-spring)
- [A Custom Media Type for a Spring REST API](https://www.baeldung.com/spring-rest-custom-media-type)
- [Download an Image or a File with Spring MVC](https://www.baeldung.com/spring-controller-return-image-file)
- [Proxies With RestTemplate](https://www.baeldung.com/java-resttemplate-proxy)
### NOTE:

View File

@ -5,12 +5,10 @@ import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import com.baeldung.produceimage.ImageApplication;
import com.baeldung.responseheaders.ResponseHeadersApplication;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = { ImageApplication.class,
ResponseHeadersApplication.class,
@SpringBootTest(classes = { ResponseHeadersApplication.class,
com.baeldung.web.upload.app.UploadApplication.class,
})
public class SpringContextTest {