2020-03-31 14:02:29 +02:00
|
|
|
package eu.dnetlib.uoaadmintools;
|
|
|
|
|
2021-02-25 12:57:22 +01:00
|
|
|
//import eu.dnetlib.uoaadmintools.configuration.properties.SecurityConfig;
|
|
|
|
//import eu.dnetlib.uoaadmintools.handlers.AuthorizationHandler;
|
2020-03-31 14:02:29 +02:00
|
|
|
import org.apache.log4j.Logger;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by argirok on 23/2/2018.
|
|
|
|
*/
|
|
|
|
|
|
|
|
@Configuration
|
|
|
|
public class UoaAdminToolsConfiguration extends WebMvcConfigurerAdapter {
|
|
|
|
private final Logger log = Logger.getLogger(this.getClass());
|
|
|
|
|
2021-02-25 12:57:22 +01:00
|
|
|
// @Autowired
|
|
|
|
// private SecurityConfig securityConfig;
|
2020-03-31 14:02:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
|
|
|
|
return new PropertySourcesPlaceholderConfigurer();
|
|
|
|
}
|
|
|
|
|
2021-02-25 12:57:22 +01:00
|
|
|
// @Override
|
|
|
|
// public void addInterceptors(InterceptorRegistry registry) {
|
|
|
|
// registry.addInterceptor(new AuthorizationHandler(securityConfig.getUserInfoUrl(), securityConfig.getOriginServer(), securityConfig.getPostsAllowed()))
|
|
|
|
// .addPathPatterns("/**");
|
|
|
|
//
|
|
|
|
// }
|
2020-03-31 14:02:29 +02:00
|
|
|
|
|
|
|
}
|