Home > Spring Integration with Eclipse IDE > Spring Integration with Eclipse – SpringIDE

Spring Integration with Eclipse – SpringIDE

 

  

Spring Framework Integration with Eclipse IDE:

 

Now that we have downloaded Spring Framework, we will see how to integrate it with Eclipse IDE.

Eclipse IDE by default is just a platform for development, which doesn’t carry all the JEE features required. It doesn’t ship with support for Spring Framework as you would know by now. So we will see how to integrate Spring Framework with Eclipse IDE using a standard plugin available called SpringIDE. Eclipse IDE is available in different releases, and these steps are almost similar to all of them. This post demonstrates using Eclipse Galileo (Eclipse version 3.5.0 release). If you have any doubts related to Eclipse IDE releases or its download / installation / configuration, refer to Eclipse IDE Installation & Configuration post.

 

What is Spring IDE

SpringIDE provides a user interface for Spring configuration files, built as a set of plugins on the Eclipse platform. It is a set of free plugins for the Eclipse platform that helps in developing Spring Application. The IDE provides a wizard for creating Spring projects, and using the Graphical Editing Framework, displays graphs of all beans (objects) and relationships either within a single configuration file or within a set of configuration files. The files, or sets, are also validated as they are added / modified. There’s also support for Spring AOP, so pointcut expressions are validated in your Spring configuration. 

Spring IDE (http://www.springsource.com/products/springide) is a product from Spring Source (http://www.springsource.com/). Refer to Spring Primer for details. Latest SpringIDE version avaiable is 2.0.3.

 

Follow the steps below: 

  • Once Eclipse is up and running, use the Eclipse Software Update wizard either by navigating to Help->Install New Software (Eclipse 3.5 onwards) or Help->Software Updates (prior to Eclispe 3.5 version) as shown below: 

 

 or

 

 

 

or 

 

 

  •  For Eclipse versions 3.5 and above, click on Add button shown and then you will get the Add Site wizard. Enter the name as Spring IDE or likewise for your reference later and click ok as shown below:

 

  • Select all the Spring IDE features and click Next or Install for Eclipse 3.5 version onwards and Eclipse prior to this version respectively as shown below:

 

 or 

 

  • In case you don’t get any error by now, you will be presented with a License Agreement wizard. Select ‘I Accept the terms of the license agreement’ and click ‘Finish’. By doing this, Spring IDE plugin should be installed and integrated in your Eclipse IDE successfully as shown below:

 

 

  •   Restart Eclipse IDE as prompted and you should be ready to use Spring IDE:

 

  

  • After Eclipse restarts, we need to verify whether the plugin got installed successfully. We will do this by first choosing the Windows menu and the Preferences option of Eclipse.

 

 

  • We can then see Spring option in the left hand side item nodes in the preferences dialog. Choose the Spring option and it will expand to show three sub items.
     – AOP Support
    –  Beans Support
     – Web Flow Support

  • This confirms that our Spring IDE plugin has been installed successfully in Eclipse.

  

  

  

  

Troubleshooting Installation & Integration:

If you have any problems while installing as per above steps and get any error message in Eclipse IDE, read through the error message and don’t hesitate to uncheck that perticular plugin in the list where you have a problem (provided its optional). You can always install the plugin manually anytime again.

For example:

When you click on Next / Install after chosing the plugins you want to install, you might get an error message saying:

Cannot complete the install because one or more required items could not be found.  Software being installed: Spring IDE AJDT Integration (optional) 2.2.8.200911091054-RELEASE

In this case, as AJDT (AspectJ Development Tools) integration plugin is an optional update and if you have trouble installing it while updating the entire Spring Framework plugin, you can uncheck this plugin from the displayed list and continue to install other updates.  You can always install the plugin manually anytime again.

 

 

After doing so, and clicking on ‘Next’, you should do away with the error message and be presented with the License Agreement wizard upon selecting which your installation should be complete.

 

Note:

 

 

Advertisements
  1. sampal
    July 7, 2013 at 4:00 pm

    I already installed Spring Tool Suite.
    How can get Spring-Eclipse platform there in the spring

  2. Vijay
    February 16, 2012 at 5:07 am

    Really helpful. I just followed the instructions as they are presented here and it really worked for me. Thanks.

  3. Chris Jimenez
    January 23, 2012 at 9:42 pm

    So Easy…

  4. Mandeep
    January 20, 2012 at 9:26 pm

    I have installed spring ide. But, when i try to import org.springframework, eclipse does not recognize this. For instance, the import statement is underlined in red and a lightbulb appears to the left. I am trying to access the following imports:
    import org.springframework.context.ApplicationContext;
    import org.springframework.context.support. ClassPathXmlApplicationContext;

    • Vinn
      June 19, 2012 at 10:16 am

      You need the approppriate jars in the path

  5. Anonymous
    June 22, 2011 at 5:00 am

    Thank you for this tutorial, really helps!

  6. hem
    August 23, 2010 at 11:37 am

    i need to know whether STS supports struts 1.x and hibernate out of the box or not? if so how? i have some requirements where i need to use struts as front end with hibernate and spring. Looking forward any help in this regard. Thank you.

  7. Vlad
    November 24, 2009 at 4:21 am

    Why such troubles for spring IDE in the Eclipse? Use the Spring Tool Suite. It is free and all plugins installed. http://www.springsource.com/products/springsource-tool-suite-download

    • November 24, 2009 at 9:06 am

      @Vlad

      About Spring IDE:
      Its not really a trouble using Spring IDE in Eclipse, its just like installing any other plugin in Eclipse. Many people are familiar and fond of Eclipse and also use it with other plugins for developing their existing applications (Hibernate etc). This post can be of use to those who want to stick with traditional Eclipse and want to know how to integrate / work with basic & proven SpringIDE (which STS also uses) before using other comprehensive tools.

      About SpringSource Tool Suite:
      Yes, its great to have this tool from Spring Source. From April 2009, SpringSource Tool Suite (STS) has been free to download. Since, STS is built on top of the Eclipse technology stack, the look and feel of the UI is very Eclipse. And it can be installed and used with Eclipse 3.5 as a plugin as well. It brings best of both worlds (Spring & Eclipse) together. It includes the Spring IDE, the AspectJ Development Tools (AJDT), AspectJ, and Mylyn. Coming posts will be covering this tool in detail. In fact, I will be posting examples in ‘Exploring Spring Framework’ series developed on STS.

      Regards,
      Rajani Ramsagar

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: