spring.auto.boot.config.ClientAppWebConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sso Show documentation
Show all versions of sso Show documentation
A lightweight Java SSO Framework
The newest version!
/*
* @(#)ClientAppWebConfig.java 2021-11-5
*
* Copyright (c) 2021. All Rights Reserved.
*
*/
package spring.auto.boot.config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.github.javaclub.sso.web.interceptor.SSOLoginInterceptor;
import com.github.javaclub.sso.web.interceptor.SSOPermissionInterceptor;
/**
* ClientAppWebConfig
*
* @author Gerald Chen
* @version $Id: ClientAppWebConfig.java 2021-11-5 11:05:27 Exp $
*/
@Configuration
public class ClientAppWebConfig implements WebMvcConfigurer, InitializingBean {
private static final Logger log = LoggerFactory.getLogger(ClientAppWebConfig.class);
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new SSOLoginInterceptor()).addPathPatterns("/**");
registry.addInterceptor(new SSOPermissionInterceptor()).addPathPatterns("/**");
}
@Override
public void afterPropertiesSet() throws Exception {
log.info("SSO ClientAppWebConfig init successfully.");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy