When first starting out with Spring 3 and annotations rather than xml configuration there seem to be a number of common steps that need to taken for almost any new project. Spring Roo takes many of these steps for you and avoids the need to use standard configuration and boilerplate code.
Even though you have installed STS (including Roo) you may still not find 200 key-presses gives you a working web application. Typically, if you start developing your domain objects first, you may find that your new project doesn’t work. Before panicing or trawling through Google search results look at your database setup.
After installing MySql and then trying to run a new Spring MVC project with a very simple persistence layer, I found the following:
- the default installation does not really support transactions. You should configure Innodb for transaction support.
- anonymous user accounts seemed to corrupt or interfere with the account logins.
Anyway without going into too much detail I realised I needed a working project just to test my database properties and setup. So my tip is before you use configure yourself a new application to use a database, test the database is as you expect.