Revision f2d3f4d3
Added by Andreas Kohlbecker over 5 years ago
cdmlib-remote-webapp/src/main/java/eu/etaxonomy/cdm/remote/config/CdmSpringMVCConfigDefault.java | ||
---|---|---|
12 | 12 |
import org.springframework.context.annotation.Configuration; |
13 | 13 |
import org.springframework.context.annotation.Import; |
14 | 14 |
import org.springframework.context.annotation.Profile; |
15 |
import org.springframework.test.context.ActiveProfiles; |
|
16 | 15 |
|
17 | 16 |
/** |
18 | 17 |
* @author a.kohlbecker |
... | ... | |
21 | 20 |
*/ |
22 | 21 |
//@EnableWebMvc // do not add this since we are overriding WebMvcConfigurationSupport directly |
23 | 22 |
@Profile("!swagger") |
24 |
@ActiveProfiles("remoting") |
|
25 | 23 |
@Configuration |
26 | 24 |
@Import(value={PreloadedBeans.class}) // can not be replaced by @DependsOn("...") ? |
27 | 25 |
//@DependsOn("objectMapperConfigurer") |
cdmlib-remote-webapp/src/main/webapp/WEB-INF/web.xml | ||
---|---|---|
21 | 21 |
<param-name>contextConfigLocation</param-name> |
22 | 22 |
<param-value>/WEB-INF/applicationContext.xml</param-value> |
23 | 23 |
</context-param> |
24 |
<context-param> |
|
25 |
<param-name>spring.profiles.active</param-name> |
|
26 |
<param-value>remoting</param-value> |
|
27 |
</context-param> |
|
24 | 28 |
<listener> |
25 | 29 |
<!-- loads by default /WEB-INF/applicationContext.xml but this can be overridden above --> |
26 | 30 |
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> |
Also available in: Unified diff
ref #8173 activation of profile remoting in the web.xml