Skip to content

Commit 028d51c

Browse files
committed
test: AdminAuthInterceptor 관련 WebMvcConfig 테스트 구성 추가
1 parent 4cbcc0b commit 028d51c

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package maeilmail.support;
2+
3+
import maeilmail.admin.api.AdminAuthInterceptor;
4+
import org.springframework.beans.factory.annotation.Autowired;
5+
import org.springframework.boot.test.context.TestConfiguration;
6+
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
7+
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
8+
9+
@TestConfiguration
10+
public class AdminWebMvcConfig implements WebMvcConfigurer {
11+
12+
@Autowired
13+
private AdminAuthInterceptor adminAuthInterceptor;
14+
15+
@Override
16+
public void addInterceptors(InterceptorRegistry registry) {
17+
registry.addInterceptor(adminAuthInterceptor)
18+
.addPathPatterns("/admin/**");
19+
}
20+
}

0 commit comments

Comments
 (0)