Welcome to another week in #Scala. We've been busy working on our open source projects here at LoansWithNoCreditCheck and have finally got spec2 spring published to Maven central and Sonatype. This week has been fairly quiet from a Scala point of view (compared to normal standards anyway) but there are still a few interesting posts and releases to tell you about.
We're pleased to release version 0.4 of Specs2 Spring!
0.4 follows the very short-lived Maven Central practice-release 0.3. We now include support for Spring 2.5, 3.0 and 3.1; for the latest verion of Spring, we include bean profiles and environment variables settable from the test annotations. We have also included support for raw SessionFactory and HibernateTemplate to work with the most popular ORM tool. The updates include:
Spring 3.1 brings bean profiles, allowing you to name sets of beans that will be included in your ApplicationContext according to your specifications. For example, I could have bean profiles named UCI and ACU. In both profiles, I will have a bean that implements the LegalRegulations interface, but the implementations will be different. At runtime, I will specify which bean profiles I want to use and Spring will pick the appropriate beans for the given profile. Let me show you some code: