티스토리 뷰

Skill/spring

Spring boot Interceptor

진열사랑 2020. 9. 2. 14:45
package com.mindone;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.mindone.okch.interceptor.LoginCheckInterceptor;

@Configuration
public class InterceptorConfiguration implements WebMvcConfigurer {
	
	@Override
    public void addInterceptors(InterceptorRegistry registry) { // 2019.11.12 추가 by ljpark
        registry.addInterceptor(new LoginCheckInterceptor())
                .addPathPatterns("/**")
                .excludePathPatterns("/login/**") //로그인 쪽은 제외
        		.excludePathPatterns("/api/swagger-ui.html") //스웨거 쪽은 제외
        		.excludePathPatterns("/api/iiana/wtFlows/chk") //유량계 데이터 점검 제외
        		;
    }

}
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함