Project

General

Profile

Download (1.68 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2017 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.addon.config;
10

    
11
import javax.servlet.annotation.WebServlet;
12

    
13
import org.apache.log4j.Logger;
14
import org.springframework.context.annotation.ComponentScan;
15
import org.springframework.context.annotation.Configuration;
16

    
17
import com.vaadin.spring.annotation.EnableVaadin;
18
import com.vaadin.spring.server.SpringVaadinServlet;
19

    
20
import eu.etaxonomy.vaadin.ui.annotation.EnableVaadinSpringNavigation;
21

    
22
/**
23
 *
24
 * @author a.kohlbecker
25
 * @since Feb 8, 2017
26
 *
27
 */
28
@Configuration
29
@ComponentScan(basePackages={
30
        "eu.etaxonomy.cdm.vaadin",
31
        "eu.etaxonomy.vaadin.ui",
32
        "eu.etaxonomy.cdm.mock" // FIXME remove once mocks are no longer needed
33
        })
34
@EnableVaadin   // this imports VaadinConfiguration
35
@EnableVaadinSpringNavigation // activate the NavigationManagerBean
36
public class CdmVaadinConfiguration {
37

    
38
    public static final Logger logger = Logger.getLogger(CdmVaadinConfiguration.class);
39

    
40
    /*
41
     * NOTE: It is necessary to map the URLs starting with /VAADIN/* since none of the
42
     * @WebServlets is mapped to the root path. It is sufficient to configure one of the
43
     * servlets with this path see BookOfVaadin 5.9.5. Servlet Mapping with URL Patterns
44
     */
45
    @WebServlet(value = {"/app/*", "/VAADIN/*"}, asyncSupported = true)
46
    public static class Servlet extends SpringVaadinServlet {
47
    }
48

    
49
    public CdmVaadinConfiguration() {
50
        logger.debug("CdmVaadinConfiguration enabled");
51
    }
52

    
53

    
54
}
(1-1/2)