Unit Testing /login in Spring MVC using MockMvc

前端 未结 4 2191
孤街浪徒
孤街浪徒 2021-01-11 18:29

I have a very simple REST application created using Spring MVC. (Code is available at GitHub.) It has a simple WebSecurityConfigurer as follows:

@Override
pr         


        
4条回答
  •  太阳男子
    2021-01-11 19:11

    Following my post here: Spring MockMvcBuilders Security filter

    I have manage to create REST API with UsernamePasswordAuthenticationToken for /oauth/token but I didn't manage to create the test for my protected resource (on running server it work fine). Could you show us your REST interface ?

提交回复
热议问题