A Scala Spring Framework dependency injection example

Curious about how well Scala would play with the Spring Framework, I created a small Scala/Spring dependency injection example project, which I'm sharing here.

The short answer is that Scala worked just fine with Spring, but it also showed me that I still have plenty to learn about inheritance in Scala.

My Spring applicationContext.xml file

I copied a Spring applicationContext.xml file from another project, then whittled it down to these bare essentials:

A Spring MySQL BasicDataSource connection example

Spring MySQL FAQ: Can you share a Java Spring MySQL example, showing how to create a Spring Framework application context file so a Java standalone application can connect to a MySQL database?

Sure, here's a Java/Spring MySQL example, specifically showing a Spring application context file that sets up a BasicDataSource (connection) to let your Java application connect to a MySQL database.

Spring Dao/JDBC tip - a great way to test your Spring DAO code

The Spring Framework gives you a great way to test your Spring JDBC (Spring DAO) code. Just use a special Spring JDBC class with a very long name, and you can test your Spring JDBC code against a real database.

Some people don't like this approach, but I think it's invaluable for (a) testing your SQL syntax when you first create it, and (b) making sure your SQL syntax is still valid after database changes occur.