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 8487553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:16:43+00:00 2026-06-10T21:16:43+00:00

I am new to working with Spring and I just joined a team of

  • 0

I am new to working with Spring and I just joined a team of developers that is utilizing it for the product we are working on. I am beginning to understand IoC. However, I am flummuxed on one particular point. I have searched for an answer, but have been unable to find anything.

The class I am looking at has the @Controller annotation set on it. One of the methods has the @RequestMapping annotation. The method signature of this particular method contains a parameter for one of my company’s proprietary classes. This proprietary class does not have any annotations on it for Spring nor is it listed in the Spring configuration file.

So, my question is: how does that parameter get injected when there isn’t anything to help the framework identify it?

I suspect that it is able to do this because on the previous transaction the proprietary class is added to the Model via ModelAndView.addObject(), but I was hoping someone could confirm or deny.

The particular scenario is this:

  1. user requests login page
  2. addObject(proprietaryClass)
  3. user presented with login page
  4. user clicks button to login
  5. method is called with proprietary class in method signature.

Any help would be great.

  • 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-10T21:16:44+00:00Added an answer on June 10, 2026 at 9:16 pm

    Spring is smart… real smart. It can look at the names of the request parameters and map them to POJOs by field name. For instance, if your user has a “first” and “last” fields, you could pass in user.first=Joe&user.last=Blow and it would attempt to set the “first” and “last” properties of your user object. Have a look at http://www.jpalace.org/docs/technotes/spring/mvc-params.html specifically the section named Binding Domain Objects.

    Another option is that they have implemented a converter, or converter factory. In my project I implemented a generic ConverterFactory that handles any of my database entities, takes a Long and converts it to the materialized entity by looking it up by id.

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

Sidebar

Related Questions

I'm new to Spring. I just recently got an example working with annotations and
I am new to spring MVC,and just started working on it.I would like to
I am new to working with Spring on regular basis so I had a
I'm really new to Spring and Spring MVC and I'm working on a kind
We are working on a new project with Grails 2.0.1 and Spring Security. The
I am new to Spring MVC. But I had certain experience in working with
I am new to Spring Security. I have been working on creating a custom
I'm way new to working with XML but just had a need dropped in
Is ModelMap just the new name in Spring 3 for a ModelAndView ? Does
Yesterday I downloaded the new Spring 3.1RC to test the just introduced support for

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.