절대적 발전

  • 홈
  • 태그
  • 방명록

2022/01/09 2

[스프링 시큐리티] 스프링 시큐리티 테스트 - Form Login

폼 로그인 / 로그아웃 테스트 (SecurityMockMvcRequestBuilders) perform(formLogin()) perform(formLogin().user("admin").password("123")) perform(logout()) @Test @Transactional public void login_success() throws Exception { String username = "twlee"; String password = "123"; Account user = createUser(username, password); mockMvc.perform(formLogin().user(user.getUsername()).password(password)) .andExpect(authent..

스터디-Spring 2022.01.09

[스프링 시큐리티] 스프링 시큐리티 테스트 - RequestPostProcessor, Annotations

기존의 불편한 수동테스트 직접 파라미터를 통한 가입 - 로그인 - 조회로 테스트 반복되는 수동 단위 테스트에 불필요한 시간 소모가 큼 pom.xml org.springframework.security spring-security-test test ${spring-security.version} spring-security version을 따라가게끔 설정 SecurityMockMvcRequestPostProcessors를 이용한 테스트 방법 @ExtendWith(SpringExtension.class) @SpringBootTest @AutoConfigureMockMvc public class AccountControllerTest { @Autowired MockMvc mockMvc; @Test public..

스터디-Spring 2022.01.09
1
더보기
프로필사진

  • 분류 전체보기 (83)
    • 프로그래밍 (8)
    • IDE (3)
    • Java (13)
    • Spring (12)
    • Node.js (2)
    • Vue.js (1)
    • Flutter (5)
    • IT Tip (6)
    • Infrastructure (5)
    • 스터디-Spring (27)
    • 스터디-알고리즘 (1)

Tag

Security, java, 개발, frontend, windows10, Flutter, node, thymeleaf, 안드로이드, DART, 플러터, 튜토리얼, android, JPA, 소프트웨어 아키텍쳐, 스프링, EffectiveJava, querydsl, docker, Spring,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

Calendar

«   2022/01   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

티스토리툴바