1package org.apache.archiva.rest.services.interceptors;
2/*3 * Licensed to the Apache Software Foundation (ASF) under one4 * or more contributor license agreements. See the NOTICE file5 * distributed with this work for additional information6 * regarding copyright ownership. The ASF licenses this file7 * to you under the Apache License, Version 2.0 (the8 * "License"); you may not use this file except in compliance9 * with the License. You may obtain a copy of the License at10 *11 * http://www.apache.org/licenses/LICENSE-2.012 *13 * Unless required by applicable law or agreed to in writing,14 * software distributed under the License is distributed on an15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY16 * KIND, either express or implied. See the License for the17 * specific language governing permissions and limitations18 * under the License.19 */202122import com.fasterxml.jackson.databind.DeserializationFeature;
23import com.fasterxml.jackson.databind.ObjectMapper;
24import org.slf4j.Logger;
25import org.slf4j.LoggerFactory;
26import org.springframework.stereotype.Service;
2728import javax.inject.Inject;
2930/**31 * class to setup Jackson Json configuration32 *33 * @author Olivier Lamy34 * @since 1.4-M335 */36 @Service("archivaJacksonJsonConfigurator")
37publicclassJacksonJsonConfigurator38 {
39private Logger log = LoggerFactory.getLogger( getClass() );
4041 @Inject
42publicJacksonJsonConfigurator( ObjectMapper objectMapper )
43 {
44 log.info( "configure jackson ObjectMapper" );
45 objectMapper.configure( DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false );
46 }
47 }