Getting started with spring frame

What is the best way to start with the spring framework, I already have a spring book in action on the 2nd edition of August 2007, but here's what, I missed some general knowledge regarding this framework and Java. I started reading the book, but I don’t understand it very much, it’s clear what the author is trying to do, but I can’t rewrite my examples. I use eclipse to write code, and I'm a little confused where to put the xml file and where the java files, etc.

+5
spring eclipse spring-mvc
source share
6 answers

4 Things You'll Need

You have to buy Spring recipes, but it SHOULD be MUST, it will help you a lot, and the rest will be free and irreplaceable. By the way, Craig Walls book is not bad. You can also download refcardz for Spring Configuration (also Craig Walls) and Spring Annotations.

+6
source share

To quickly see the project and some code in action, you should check out SpringSource Tools Suite (free and eclipse-based).

The STS Dashboard contains tutorials for the Spring heap in that they set up the actual project and go through the code. For web applications, it will even be used for tomcat so you can see how it works. In the end, you have a working draft to play with it!

+5
source share

Try experimenting with minimal basics using only a dependency injection container. Initialize such a simple application context where applicationContext.xml is at the top of your class path.

 AbstractApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); context.registerShutdownHook(); 

Use a simple one (copy and paste directly from my IDE; most imported schemes are not important to you). The application context definition is as follows:

 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:lang="http://www.springframework.org/schema/lang" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> <bean id="HelloWorld" class="java.lang.String" lazy-init="false"> <constructor-arg value="Hello world"/> </bean> 

  • Read the high level reference (with emphasis on chapters 3 and 4) and then Spring on an example .
  • After reading Chapter 3, you can define simple beans with dependencies and FactoryBeans.
  • Learn about <context:component-scan .../> to omit some bean declarations.
  • Return to SO to ask more questions :-)
+3
source share

A series of Spring articles have appeared in the InformIT Java Reference Guide that you may find helpful.

+1
source share

I found that tutorials for the Appfuse framework are a great way to get to know the basic Spring features.

Although he’s already several years old, I also recommend any of Rod Johnson’s books where he expounds Spring’s design and philosophy: J2EE Expert One-on-One Design and Development , J2EE Development One-on-One Expert without EJB and Professional Java development with Spring Framework .

Spring documentation is great, and I still usually learn something new every time I visit. The first few chapters will help you understand some of the basic concepts of Spring (i.e., Invert control / dependency insertion).

Spring Roo is a new project that can help you quickly build the infrastructure for a Spring-based application, but I have not seen any tutorials to help you figure it out yet.

+1
source share

I used the book "Spring Persistence the running Start" and some tutorials that I found on the Internet for eclipse / java / maven, etc., and have been running (-ish) for several weeks. I also had other spring books, but I found the launch to be one of the best since it covered JPA and hibernation.

Here is the link

0
source share

All Articles