开发者

How to smoothly discover the Spring Framework?

开发者 https://www.devze.com 2023-02-20 16:36 出处:网络
I am starting to learn the Spring Framework. I came across 开发者_如何学Gothis link but I can\'t understand in which order to learn from these?

I am starting to learn the Spring Framework. I came across 开发者_如何学Gothis link but I can't understand in which order to learn from these?

Can anybody help me out?


The order of the entries on that page isn't organized so that you can gradually learn the concepts.

I'd rather advise you to try and go through the official Spring documentation first and take a look at the samples that come together with Spring. It'll give you an idea of the possibilities. Also, don't forget to make sure that you understand what the Inversion of Control (IoC) pattern is and why it's useful.

Here's what I'd recommend to someone starting out with Spring and IoC:

You should first try to use Spring in a very simple command-line application (hello world style).

  1. Create an application context in xml and load it from your main method
  2. Define a bean and retrieve it from your freshly loaded application context
  3. Try to add a second bean definition in the application context and play with the bean definitions
  4. Learn how to inject beans in properties, in constructors, ...

Play with those for a while in order to get a good feeling of what Spring core actually does for you (the IoC container) and how it can help you to decouple components in your code

Once you have a clear understanding of that, you can move on and read about Spring annotations and how you can either use xml or annotations (or even combine both approaches) to wire up your beans

You should only start using Spring in a Web application after having played around enough with the above. Once you have all that under control, then it'll be time to discover more advanced stuff and other Spring portfolio projects such as Spring Security, Spring MVC, Spring AOP, ...

The following are nice to have on the desk: - Spring Configuration Refcard - Spring Annotations Refcard

In any case, have fun! :)


I suggest you to learn from a books I use Spring Recipes Second Edition to learn spring, the books is very technical and explain a good concept about spring

0

精彩评论

暂无评论...
验证码 换一张
取 消