The Artima Developer Community
Sponsored Link

Java Buzz Forum
spring 2 short bean props notation

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Marc Logemann

Posts: 594
Nickname: loge
Registered: Sep, 2002

Marc Logemann is founder of www.logentis.de a Java consultancy
spring 2 short bean props notation Posted: Nov 28, 2006 4:25 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Marc Logemann.
Original Post: spring 2 short bean props notation
Feed Title: Logemann Blog
Feed URL: http://www.logemann.org/blojsom/blog/default/?flavor=rss2
Feed Description: Marc's thoughts on Java and more
Latest Java Buzz Posts
Latest Java Buzz Posts by Marc Logemann
Latest Posts From Logemann Blog

Advertisement

I am clearly a big spring fan. I like most of the new stuff which went into 2.0 but after seing two blogs which advertised the new properties shorthand notation for beans, which is like this:

   <bean id="foo" class="com.habuma.foobar.Foo"
        p:bar-ref="bar"
        p:baz="42" />

I must say, i wont use it because it looks ugly. Its in the same visual comfort league as generics syntax in java. Sorry, i will stay with the little more verbose version:

   <bean id="foo" class="com.habuma.foobar.Foo">
      <property name="bar" ref="bar" />
      <property name="baz" value=42" />
    </bean>
BTW, i never tried it but i could imagine that IDEA can handle the more verbose version better, but this is a blatant assumption without ever trying it.

Read: spring 2 short bean props notation

Topic: Flickr: 112306_10511.jpg Previous Topic   Next Topic Topic: Why enterprise developers (generally) use Java and game programmers (generally) use C

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use