![Hands-On Spring Security 5 for Reactive Applications](https://wfqqreader-1252317822.image.myqcloud.com/cover/594/36699594/b_36699594.jpg)
上QQ阅读APP看书,第一时间看更新
Step 6—Web application configuration
In this example, we are going to use Spring MVC as our web application framework. Let's create the web application configuration file:
@Configuration
@EnableWebMvc
@ComponentScan(basePackages= {"com.packtpub.book.ch02.springsecurity.controller"})
public class WebApplicationConfig implements WebMvcConfigurer {
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
registry.jsp().prefix("/WEB-INF/views/").suffix(".jsp");
}
}
The @EnableWebMvc annotation makes sure that your application is based on Spring MVC.