Kennis Spring - Scala

Spring - Scala

At Devoxx 2012 Arjen Poutsma held an excellent presentation on Spring integration in Scala. The project is called spring-scala and offers some very nice features that definitely support Scala projects.

With the creation of spring-scala SpringSource brings (amongst other things) a great dependency injection framework to Scala. Spring is well-known by many developers and has a proven trackrecord.

Spring-scala in Action

There are a couple of ways to declare Spring beans in Scala, this example uses just Scala, but @BeansProperty and XML are also possibilities:

The example code above shows the creation of 3 beans that can be used in your application.

While spring-scala is still a work in progress it is definitely looking good and is worth looking into if you're doing a Scala project. More information is available on the github site: https://github.com/SpringSource/spring-scala