changeset 2:856e646efa17

Weg von der one-size-fits-all @EnableAutoConfiugration hin zu einer bewussten Auswahl von auto config Klassen
author Dirk Olmes <dirk.olmes@codedo.de>
date Thu, 13 Aug 2020 14:16:13 +0200
parents 60afb461bf6c
children b4221c1389af
files spring-boot-playground/src/main/java/de/comline/spring/application/Application.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/spring-boot-playground/src/main/java/de/comline/spring/application/Application.java	Tue Aug 11 16:08:16 2020 +0200
+++ b/spring-boot-playground/src/main/java/de/comline/spring/application/Application.java	Thu Aug 13 14:16:13 2020 +0200
@@ -8,6 +8,7 @@
 import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
 import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
 import org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration;
+import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -48,14 +49,14 @@
 
 	// ServletWebServerFactoryAutoConfiguration for bringing up the embedded tomcat
 	// DispatcherServletAutoConfiguration for detecting the REST controllers
+	// WebMvcAutoConfiguration enabling Jackson response serialization
 	// @formatter:off
 	@Import({
 			ServletWebServerFactoryAutoConfiguration.class,
 			DispatcherServletAutoConfiguration.class,
 			JacksonAutoConfiguration.class,
 			HttpMessageConvertersAutoConfiguration.class,
-//			HttpEncodingAutoConfiguration.class,
-//			CodecsAutoConfiguration.class,
+			WebMvcAutoConfiguration.class,
 			
 			HelloController.class,
 			CustomLogicController.class,