Nov
28
2005

Spring 1.3 featuring IntelliBean

It seems that Spring 1.3 is going to contain a lot of cool new features. One of those is a pretty small addition increasing the quality of the error messages Spring displays when you have typos in your XML configuration files. Last week Arjen and me added so-called IntelliBean support, using an edit distance algorithm. From now on, you will get suggestions when you mistype the name of a property in your XML file(s). Exceptions from now on will look like this, considering the example given below.

org.springframework.beans.NotWritablePropertyException: Invalid property ‘nam’ of bean class [org.springframework.test.MyBean]: Bean property ‘nam’ is not writable or has an invalid setter method.
Did you mean ‘name’, or ‘names’?

# MyBean.java
public class MyBean {
  public void setName(String name)  { ... }
  public void setNames(String[] names)  { ... }
}
 
<bean class="org.springframework.test.MyBean">
  <property name="nam" value="Alef"/>
</bean>

You can expect other significant features to be added to the 1.3 release as well.

Written by Alef in: Java-related, Spring |

2 Comments »

  • Arjen says:

    BTW: IntelliBean is a registered trademark in the Netherlands and other countries, exclusively licensed through Alef Arendsen and Arjen Poutsma. ;-)

  • Jacob says:

    IMHO in the days of the Spring IDE, this functionality is of minor importance. However, when making small changes from the console (for example on a server), it may provide great value. It’s great to see that the Spring Framework is getting even better. Keep up the good work!

RSS feed for comments on this post. TrackBack URL


Leave a Reply

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com