[SPR-8454] Introduce Registration objects in Spring MVC Java-based configuration API Created: 15/Jun/11  Updated: 15/Jan/19  Resolved: 15/Jun/11

Status: Closed
Project: Spring Framework
Component/s: Web
Affects Version/s: 3.1 M2
Fix Version/s: 3.1 RC1

Type: Improvement Priority: Minor
Reporter: Rossen Stoyanchev Assignee: Rossen Stoyanchev
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Days since last comment: 9 weeks, 3 days ago
Last commented by a User: true
Last updater: Spring Issuemaster


Summary of changes:

  1. Introduce methods returning Registration objects where multiple registrations are expected (interceptors, view controllers)
  2. Allow configuration of multiple resource handlers via same Registration object approach
  3. Change suffix of classes that return Registration objects from *Configurer to *Registry

Before & After:

public void configureInterceptors(InterceptorConfigurer interceptorConfigurer) {
  interceptorConfigurer.mapInterceptor(new String[] {"/foo"}, new FooInterceptor());
public void addInterceptors(InterceptorRegistry registry) {
  registry.addInterceptor(new FooInterceptor()).addPathPatterns("/foo");

Before & After:

public void configureViewControllers(ViewControllerConfigurer configurer) {
  configurer.mapViewName("/foo", "foo");
public void addViewControllers(ViewControllerRegistry registry) {

Before & After:

public void configureResourceHandling(ResourceConfigurer configurer) {
public void addResourceHandlers(ResourceHandlerRegistry registry) {

Comment by Spring Issuemaster [ 14/Jan/19 ]

The Spring Framework has migrated to GitHub Issues. This issue corresponds to spring-projects/spring-framework#13100.

Generated at Thu Mar 21 22:33:59 UTC 2019 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.