package eu.eudat.configurations; import eu.eudat.handlers.PrincipalArgumentResolver; import eu.eudat.services.AuthenticationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import java.util.List; /** * Created by ikalyvas on 12/15/2017. */ @Configuration public class WebMVCConfiguration extends WebMvcConfigurerAdapter { @Autowired AuthenticationService authenticationService; @Override public void addArgumentResolvers(List argumentResolvers) { argumentResolvers.add(new PrincipalArgumentResolver(this.authenticationService)); } }