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.devday.ui.annotation.EnableVaadinSpringNavigation;
|
18
|
import com.vaadin.spring.annotation.EnableVaadin;
|
19
|
import com.vaadin.spring.server.SpringVaadinServlet;
|
20
|
|
21
|
/**
|
22
|
*
|
23
|
* @author a.kohlbecker
|
24
|
* @since Feb 8, 2017
|
25
|
*
|
26
|
*/
|
27
|
@Configuration
|
28
|
@ComponentScan(basePackages={
|
29
|
"eu.etaxonomy.cdm.vaadin",
|
30
|
"com.vaadin.devday.ui"
|
31
|
})
|
32
|
@EnableVaadin // this imports VaadinConfiguration
|
33
|
@EnableVaadinSpringNavigation // activate the NavigationManagerBean
|
34
|
public class CdmVaadinConfiguration {
|
35
|
|
36
|
public static final Logger logger = Logger.getLogger(CdmVaadinConfiguration.class);
|
37
|
|
38
|
/*
|
39
|
* NOTE: It is necessary to map the URLs starting with /VAADIN/* since none of the
|
40
|
* @WebServlets is mapped to the root path. It is sufficient to configure one of the
|
41
|
* servlets with this path see BookOfVaadin 5.9.5. Servlet Mapping with URL Patterns
|
42
|
*/
|
43
|
@WebServlet(value = {"/app/*", "/VAADIN/*"}, asyncSupported = true)
|
44
|
public static class Servlet extends SpringVaadinServlet {
|
45
|
}
|
46
|
|
47
|
public CdmVaadinConfiguration() {
|
48
|
logger.debug("CdmVaadinConfiguration enabled");
|
49
|
}
|
50
|
|
51
|
|
52
|
}
|