2 * Copyright © 2018 European Support Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 * ============LICENSE_END=========================================================
16 * Modifications copyright (c) 2019 Nokia
17 * ================================================================================
20 package org.onap.sdc.workflow.server.config;
22 import java.util.List;
23 import org.onap.sdc.workflow.server.resolvers.UserIdResolver;
24 import org.openecomp.sdc.logging.servlet.spring.LoggingInterceptor;
25 import org.springframework.beans.factory.annotation.Autowired;
26 import org.springframework.context.annotation.Configuration;
27 import org.springframework.web.method.support.HandlerMethodArgumentResolver;
28 import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
29 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
32 public class ApplicationConfigurer implements WebMvcConfigurer {
34 private final LoggingInterceptor loggingInterceptor;
37 public ApplicationConfigurer(LoggingInterceptor loggingInterceptor) {
38 this.loggingInterceptor = loggingInterceptor;
42 public void addInterceptors(InterceptorRegistry registry) {
43 registry.addInterceptor(loggingInterceptor);
47 public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
48 argumentResolvers.add(new UserIdResolver());