• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How does the spring process the annotations in MVC

 
Ranch Hand
Posts: 42
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All JavaRanchers,

i am new to Spring MVC with annotations and i confused about how does the spring convert all the annotations into data, like converting the spring configuration xml file into java objects using some parsers.
please inform me basic mechanism done while converting the annotations into configuration data in Spring MVC
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rambabu,

This question is too broad to answer in a post. I suggest that you pick up a book like Spring In Action

THe short answer is that it's mostly Reflection. Spring uses reflection to instantiate the objects specified in the spring XML. It uses refelection to inspect the annotations, and also autowiring. THe good thing is that reflection code executes only during startup. After that, Spring steps away and let the services work like usual. So, the overhead of reflection is only during startup
 
rambabu desina
Ranch Hand
Posts: 42
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you for giving reply.

please can you provide basic packages and classes of Spring mvc ,which are used to convert the annotations in to objects using reflection mechanism .
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic