Project

General

Profile

Download (1.41 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
/**
21
 *
22
 * @author a.kohlbecker
23
 * @since Feb 8, 2017
24
 *
25
 */
26
@Configuration
27
@ComponentScan(basePackages={"eu.etaxonomy.cdm.vaadin"})
28
@EnableVaadin   // this imports VaadinConfiguration
29
public class CdmVaadinConfiguration {
30

    
31
    public static final Logger logger = Logger.getLogger(CdmVaadinConfiguration.class);
32

    
33

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

    
43

    
44
    public CdmVaadinConfiguration() {
45
        logger.debug("CdmVaadinConfiguration enabled");
46
    }
47

    
48
}
(1-1/2)