Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8289499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:31:19+00:00 2026-06-08T12:31:19+00:00

Spring MVC creates some default out of the box Objects such as HandlerMapping, ViewResolver

  • 0

Spring MVC creates some default out of the box Objects such as HandlerMapping, ViewResolver etc.

Where is the configuration file in which these beans which are created by default are configured? (I am not talking about the config file which we provide).

I am asking where is the default configuration stored which Spring uses to create default out of the box implementations of above mentioned objects?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:31:20+00:00Added an answer on June 8, 2026 at 12:31 pm

    I am assuming you are asking about the default handlerMapping, validators that are created by Spring MVC when you specify something like <mvc:annotation-driven>.

    This is basically a custom Spring namespace called mvc, this custom namespace is handled by MvcNamespaceHandler. If you look at the source of this class, this is some of the relevant content:

        registerBeanDefinitionParser("annotation-driven", new AnnotationDrivenBeanDefinitionParser());
        registerBeanDefinitionParser("default-servlet-handler", new DefaultServletHandlerBeanDefinitionParser());
        registerBeanDefinitionParser("interceptors", new InterceptorsBeanDefinitionParser());       
        registerBeanDefinitionParser("resources", new ResourcesBeanDefinitionParser());
        registerBeanDefinitionParser("view-controller", new ViewControllerBeanDefinitionParser());
    

    This is essentially registering a series of parsers based on which tag is found, so above it is registering a AnnotationDrivenBeanDefinitionParser for annotation-driven tag of mvc namespace.

    It is here that the defaults are registered.

    For eg, the handlerMapping is registered this way:

        RootBeanDefinition methodMappingDef = new RootBeanDefinition(RequestMappingHandlerMapping.class);
        methodMappingDef.setSource(source);
        methodMappingDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
        methodMappingDef.getPropertyValues().add("order", 0);
        String methodMappingName = parserContext.getReaderContext().registerWithGeneratedName(methodMappingDef);
    

    Along the same lines other components are registered. So in essence, the configuration is in the different AnnotationDrivenBeanDefinitionParsers via code and not in any specific configuration file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some web-project (Spring MVC + Hibernate). For hibernate objects I am using
I am using Spring MVC with Hibernate. My page has a button that creates
In Spring MVC Hibernate application , when i am trying to use properties file
I have some problems with ASP.NET MVC’s default model binder. The View contains HTML
I've been playing around with the default MVC 1 site, adding some fields to
I have an asp.net mvc application, which uses the default user database. It all
I have a Java/Spring MVC/JSP/JSTL webapp. We have a designer that gave us some
im using spring MVC and webflow to create a game server and serve some
I am writing an application that uses GWT, some Spring MVC and Spring Security.
I have a spring mvc application and I am rendering some pdfs using classes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.