2 * Copyright (C) 2014 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
.springframework
.context
.annotation
.Bean
;
12 import org
.springframework
.context
.annotation
.Configuration
;
14 import com
.fasterxml
.jackson
.databind
.DeserializationFeature
;
15 import com
.fasterxml
.jackson
.databind
.MapperFeature
;
16 import com
.fasterxml
.jackson
.databind
.ObjectMapper
;
18 import eu
.etaxonomy
.cdm
.remote
.controller
.interceptor
.LocaleContextHandlerInterceptor
;
21 * @author a.kohlbecker
25 public class PreloadedBeans
{
28 public LocaleContextHandlerInterceptor
getlocaleContextHandlerInterceptor(){
29 return new LocaleContextHandlerInterceptor();
33 * This is only used for Converters so far
36 public ObjectMapper
objectMapper() {
37 ObjectMapper mapper
= new ObjectMapper();
38 mapper
.configure(DeserializationFeature
.FAIL_ON_UNKNOWN_PROPERTIES
, false);
39 mapper
.configure(MapperFeature
.DEFAULT_VIEW_INCLUSION
, true);