2 * Copyright (C) 2016 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.cdm
.remote
.config
;
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
;
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
23 * @author a.kohlbecker
28 // @EnableWebMvc // do not add this since we are overriding
29 // WebMvcConfigurationSupport directly
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
{
42 private static final Logger logger
= LogManager
.getLogger();
44 public CdmSpringMVCConfigWithSwagger() {
46 logger
.info(" ==========================================");
47 logger
.info(" Spring Configuration Profile: Swagger");
48 logger
.info(" ==========================================");