Netbeans 6.8 and xml code completion for Spring Framework 3

Netbeans has excellent support for Spring Framework 2.5, for example completing code on Spring xml-configurations. Unfortunately out of the box there is no support for newer versions of Spring Framework, but no worries. Even though Netbeans does not download schemas from the internet for your use, with little manual work you get code completion support also for Spring 3.

First download wanted Spring framework namespace schemas to your local drive. Then select from menus ’Tools’ and ’DTD and XML Schemas’. This opens menu, where you can include your own schemas with system ids of spring framework.

For example System ID : http://www.springframework.org/schema/context
URI: spring-context-3.0.xsd

And the file itself is downloaded from http://www.springframework.org/schema/context/spring-context-3.0.xsd

After which you will have nice xml code completion also for your Spring 3 projects.

Apparently Spring 3 support is coming to Netbeans 6.9, but until then you can use the features already – if you follow these instructions.

I used to code exclusively in Eclipse, but these days Netbeans is my favourite Java IDE.

This entry was posted in java, programming. Bookmark the permalink.

3 vastausta artikkeliin: Netbeans 6.8 and xml code completion for Spring Framework 3

  1. Tulsi sanoo:

    Hello,
    I followed your instructions but I still didn’t get the xml code completion. I have even still have name space declarations in my applicationContext.xml like this:

    xmlns:context=”http://www.springframework.org/schema/context”
    xsi:schemaLocation=”http://www.springframework.org/schema/context/spring-context-3.0.xsd”

    Do you know what might have not been setup right?
    Thanks.

  2. huima sanoo:

    This got scrapped from above:

    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”

    xsi:schemaLocation=”http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-3.0.xsd

Vastaa

Täytä tietosi alle tai klikkaa kuvaketta kirjautuaksesi sisään:

WordPress.com-logo

Olet kommentoimassa WordPress.com -tilin nimissä. Log Out / Muuta )

Twitter-kuva

Olet kommentoimassa Twitter -tilin nimissä. Log Out / Muuta )

Facebook-kuva

Olet kommentoimassa Facebook -tilin nimissä. Log Out / Muuta )

Google+ photo

Olet kommentoimassa Google+ -tilin nimissä. Log Out / Muuta )

Muodostetaan yhteyttä palveluun %s