comparison spring-boot-playground/src/main/java/de/comline/spring/application/Application.java @ 3:b4221c1389af

Nur die REST Endpunkte, die in der config explizit angezogen werden, sind nachher auch registriert
author Dirk Olmes <dirk.olmes@codedo.de>
date Thu, 13 Aug 2020 14:31:40 +0200
parents 856e646efa17
children
comparison
equal deleted inserted replaced
2:856e646efa17 3:b4221c1389af
13 import org.springframework.context.annotation.Bean; 13 import org.springframework.context.annotation.Bean;
14 import org.springframework.context.annotation.Configuration; 14 import org.springframework.context.annotation.Configuration;
15 import org.springframework.context.annotation.Import; 15 import org.springframework.context.annotation.Import;
16 16
17 import de.comline.spring.application.Application.CustomConfig; 17 import de.comline.spring.application.Application.CustomConfig;
18 import de.comline.spring.controller.CustomLogicController;
19 import de.comline.spring.controller.HelloController; 18 import de.comline.spring.controller.HelloController;
20 import de.comline.spring.service.CustomLogicService;
21 19
22 //@SpringBootApplication 20 //@SpringBootApplication
23 21
24 //@ComponentScan(basePackages = "de.comline.spring.controller,de.comline.spring.service") 22 //@ComponentScan(basePackages = "de.comline.spring.controller,de.comline.spring.service")
25 //@EnableAutoConfiguration 23 //@EnableAutoConfiguration
56 DispatcherServletAutoConfiguration.class, 54 DispatcherServletAutoConfiguration.class,
57 JacksonAutoConfiguration.class, 55 JacksonAutoConfiguration.class,
58 HttpMessageConvertersAutoConfiguration.class, 56 HttpMessageConvertersAutoConfiguration.class,
59 WebMvcAutoConfiguration.class, 57 WebMvcAutoConfiguration.class,
60 58
61 HelloController.class, 59 HelloController.class
62 CustomLogicController.class, 60 // Note how we do not list the CustomLogicController here, hence the controller is not bound
63 CustomLogicService.class
64 }) 61 })
65 // @formatter:on 62 // @formatter:on
66 static class CustomConfig { 63 static class CustomConfig {
67 // no custom methods 64 // no custom methods
68 } 65 }