26 lines
872 B
Java
26 lines
872 B
Java
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.scheduling.annotation.EnableAsync;
|
|
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
|
import java.util.List;
|
|
|
|
@EnableAsync
|
|
@Configuration
|
|
public class WebMVCConfiguration extends WebMvcConfigurerAdapter {
|
|
|
|
@Autowired
|
|
AuthenticationService authenticationService;
|
|
|
|
@Override
|
|
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
|
|
argumentResolvers.add(new PrincipalArgumentResolver(this.authenticationService));
|
|
}
|
|
|
|
}
|