cleanup
[cdmlib.git] / cdmlib-remote-webapp / src / test / java / eu / etaxonomy / cdm / remote / config / CdmSpringMVCConfigWithSwagger.java
1 /**
2 * Copyright (C) 2016 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.cdm.remote.config;
10
11 import org.apache.logging.log4j.LogManager;
12 import org.apache.logging.log4j.Logger;
13 import org.springframework.context.annotation.ComponentScan;
14 import org.springframework.context.annotation.Configuration;
15 import org.springframework.context.annotation.Import;
16 import org.springframework.context.annotation.Profile;
17
18 /**
19 * Activate this profile by setting the
20 * <code>spring.profiles.active=swagger</code> either as system property or
21 * as the web application argument
22 *
23 * @author a.kohlbecker
24 * @since Feb 22, 2016
25 *
26 */
27 @Profile("swagger")
28 // @EnableWebMvc // do not add this since we are overriding
29 // WebMvcConfigurationSupport directly
30 @Configuration
31 @Import(value = { PreloadedBeans.class })
32 // can not be replaced by @DependsOn("...") ?
33 // @DependsOn("objectMapperConfigurer")
34 @ComponentScan(basePackages = {
35 "springfox.documentation.spring.web", // --> CdmSwaggerConfig
36 "eu.etaxonomy.cdm.api.service.l10n",
37 "eu.etaxonomy.cdm.remote.controller",
38 "eu.etaxonomy.cdm.remote.service",
39 "eu.etaxonomy.cdm.remote.config" })
40 public class CdmSpringMVCConfigWithSwagger extends CdmSpringMVCConfig {
41
42 private static final Logger logger = LogManager.getLogger();
43
44 public CdmSpringMVCConfigWithSwagger() {
45 super();
46 logger.info(" ==========================================");
47 logger.info(" Spring Configuration Profile: Swagger");
48 logger.info(" ==========================================");
49 }
50
51 }