permaculture playing cards
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

spring code

Andrew Cane
Ranch Hand

Joined: Aug 07, 2013
Posts: 91

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: 236
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

Joined: Mar 07, 2010
Posts: 1682

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
Saloon Keeper

Joined: Jan 17, 2008
Posts: 2744

I would start with a good book. I liked Spring in action myself
I agree. Here's the link:
subject: spring code
It's not a secret anymore!