wood burning stoves*
The moose likes Spring and the fly likes spring code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Bookmark "spring code" Watch "spring code" New topic
Author

spring code

Andrew Cane
Ranch Hand

Joined: Aug 07, 2013
Posts: 91
Hi,

I wish to learn more about how SPring works behind the scene. What does spring do to every class and methods annotated with @Controller and @RequestMapping. Does spring modify the code on the fly? Which class should I start? thanks
Surendra Kumar
Ranch Hand

Joined: Jul 04, 2006
Posts: 235
That should be similar to Java annotations that started from Java 5 version.
Those are processed by compiler plugins and other tools.
It's a language feature.
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1652
    
    7

Andrew Cane wrote:Does spring modify the code on the fly?


No, at least not for the things you mentioned. Aspects can add behavior based on an annotations, however typically this is done at compile time.

The question you ask could have a really long answer. If you are curious how things work internally Spring is open source. You are free to look through the source code.




[How To Ask Questions][Read before you PM me]
Andrew Cane
Ranch Hand

Joined: Aug 07, 2013
Posts: 91
which class should I look first? I want to focus on how @controller and @requestmapping works for now. thanks
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2384
    
  28

I would start with a good book. I liked Spring in action myself
 
GeeCON Prague 2014
 
subject: spring code