package com.gxzc.zen.ump import com.baomidou.kisso.web.interceptor.SSOPermissionInterceptor import com.baomidou.kisso.web.interceptor.SSOSpringInterceptor import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration import org.springframework.web.servlet.config.annotation.InterceptorRegistry import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter @Configuration class KissoWebAppConfigurer : WebMvcConfigurerAdapter() { /*@Bean("KissoInit") fun initKisso(){ return com.baomidou.kisso.web.WebKissoConfigurer() }*/ override fun addInterceptors(registry: InterceptorRegistry) { //登录拦截 registry.addInterceptor(SSOSpringInterceptor()) .addPathPatterns("/**") //权限拦截 registry.addInterceptor(SSOPermissionInterceptor().also { it.authorization = KissoAuthorization() }) .addPathPatterns("/**") super.addInterceptors(registry) } }