Custom media types rest (#944)
* Custom Media Types for REST * add test, add DTO, remove example of API versioning to make example simpler * client accept only that custom-media type * remove not needed new_line * leave custom media type on class level * do not need content type header * GET do not need content-Type * add liveTest for custom Content type * Merge branch 'master' of https://github.com/eugenp/tutorials into Custom_media_types_rest # Conflicts: # spring-rest/src/main/java/org/baeldung/web/controller/mediatypes/CustomMediaTypeController.java # spring-rest/src/main/java/org/baeldung/web/dto/BaeldungItem.java # spring-rest/src/test/java/org/baeldung/web/controller/mediatypes/CustomMediaTypeControllerTest.java * test name proper given_when_then pattern * add custom content-type 'application/json-p' * import proper class * proper test name * proper API migraton test, SecondBaeldungItem breaks backward compatibility
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
package org.baeldung.config;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
|
||||
import org.baeldung.config.converter.KryoHttpMessageConverter;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -15,6 +12,9 @@ import org.springframework.oxm.xstream.XStreamMarshaller;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* Please note that main web configuration is in src/main/webapp/WEB-INF/api-servlet.xml
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user