org.heigit.ohsome.ohsomeapi.config.LoggingConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ohsome-api Show documentation
Show all versions of ohsome-api Show documentation
A public Web-RESTful-API for "ohsome" OpenStreetMap history data.
package org.heigit.ohsome.ohsomeapi.config;
import org.heigit.ohsome.ohsomeapi.interceptor.LoggingRequestInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/** Logger config, used for logging response code, accessed URI and execution time. */
@Configuration
public class LoggingConfig implements WebMvcConfigurer {
@Autowired
private LoggingRequestInterceptor loggingRequestInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(loggingRequestInterceptor).addPathPatterns("/elements/**/",
"/elementsFullHistory/**/", "/metadata/**/", "/users/**/", "/contributions/**/");
}
}