Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / All-Topics

Spring Geek Night

0.00/5 (No votes)
3 Mar 2010CPOL 1  
Spring Geek Night at Technopark Zurich

SpingSource

Spring Geek Night at Technopark Zurich


Yesterday, I was at the spring geek night in Zurich. Sam Brannen, the author of the Spring TestContext Framework and previously a member of the SpringSource dm Server development team, has presented the new features of Spring 3.0.

With Spring 3.0, nearly everything is annotable. So, for all those who hate XML with Spring 3.0, you can now declare all things in your code.

A very magic stuff are these meta-annotations. Means, "annotate your annotations" and use the combination of it.

Normally, you have done something like this.

Java
@Service
@Transactional
public class CustomerService{
...
}

Then you can define the combination.

Java
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Service
@Transactional
public @interface TransactionalService {}

Now you can use this new annotation for your services.

Java
@TransactionalService 
public class CustomerService{
...
}

I know this is a Java feature, but I've never realised that's possible.

<iframe language="javascript1.1" marginwidth="0" marginheight="0" src=""http://ads.geekswithblogs.net/a.aspx?ZoneID=5&Task=Get&PageID=31016&SiteID=1"" frameborder="0" width="1" height="1" />

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)