Spring Finance > Part 1: Introduction & Architecture

To start off with my new (Enterprise) Java Development Blog here on StSMedia.net I would like to gradually develop a sample application which demonstrates various aspects of the Spring framework and some of its related projects and products.

[Disclaimer: I am currently employed as a Systems Engineer with SpringSource, the company behind the Spring framework. However, the article series I am planning to publish here on my private Web site is not sponsored by my employer and contains solely my own ideas and code.]

To my sample application:


Spring Finance is designed to be a simple finance tracker application for the Simpsons family. As some of you might know the Simpsons frequently have financial trouble of all sorts. They borrow money from their neighbour, the Ned Flanders, the local power plant owner, Mr Burns, and others. However, Homer tends to forget or miss his loan repayments. This is where the Spring Finance application comes into play.

The domain of the Spring Finance application should follow the priciples of Domain Driven Design. The following statement provides a high level vision of the problem domain as explained in Eric Evan’s book entitled Domain Driven Design on page 415:

The Domain Vision Statement

The Spring Finance application is to be used by three groups, bank account managers, bank clients and the general public. The domain model should reflect processes necessary for bank account managers to capture the essentials of financial transactions between the different parties involved. The model can represent stakeholders, accounts, financial transactions and financial products. However, the model does not include the management of more complex concepts such as compounded interests and is not meant to an in-depth representation of all possible financial constructs. Instead it should capture a minimal design to allow for the following requirements to be fulfilled:

Initial Requirements

  • Financial products offered in the system should be visible to the general public (product listings, and product details)
  • Bank managers can create, read, update and delete (CRUD) all financial products, financial transactions, accounts and stakeholders (people)
  • Financial products should initially include Loans, Cash Accounts, and Managed Funds
  • Customers can read data from their accounts when logged in
  • [more detailed requirements will be discussed in the relevant articles that follow]

Initial Domain Diagram

Here is a relatively high level class diagram which puts the above mentioned requirements into an initial design.

I should mention that I am also a trained banker and have learned some of these concepts about 10 years ago, however, I have not worked in this business since then and may be a little rusty in understanding the banking domain. While my wife, a financial planner, has helped me a little to refine the design, I am open to any comments from more seasoned ‘domain experts’ on how this can be improved.

Spring Projects

As stated above, the main purpose of the Spring Finance application is to demonstrate the development of a Enterprise Java application using the Spring framework and some of the projects under its umbrella. The intention is to demonstrate how some of the latest features are applied in a real world context.

So far my list of technologies I intend to incorporate over the course of this article series includes:

* (not decided yet, depending on the use case for it)

So, stay tuned for my first article on Spring 3, REST, EL and MVC. I am planning to make the source code of the Spring Finance sample application available in a publicly readable SVN repository.

  • Share/Bookmark

15 Responses Subscribe to comments

  1. Roger

    Awesome initiative Stefan, can`t wait for your next post!!!

    Mar 21, 2009 @ 06:55

  2. pavan kumar

    Thanks for this wonderful initiative !

    Mar 21, 2009 @ 13:15

  3. Spring Finance > Spring 3.0 REST | StSMedia

    [...] a brief introduction of the Spring Finance Manager application in part 1 of this series, I am now discussing the technical aspects of the sample application. The main focus [...]

    Mar 22, 2009 @ 09:12

  4. Daily del.icio.us for March 20th through March 24th | Vinny Carpenter's blog

    [...] Spring Finance Sample Application | StSMedia – Spring Finance is designed to be a simple finance tracker application for the Simpsons family. As some of you might know the Simpsons frequently have financial trouble of all sorts. They borrow money from their neighbour, the Ned Flanders, the local power plant owner, Mr Burns, and others. [...]

    Mar 25, 2009 @ 12:12

  5. Spring Finance > Part 4: Spring JS, Dojo & Bean Validation | StSMedia

    [...] the complete domain model for the Spring Finance Manager sample application as outlined in part 1 of this [...]

    Apr 02, 2009 @ 22:20

  6. Jim

    when deploying this application, it looks like the investments are not being displayed on the accounts/show page.

    it’s interesting, the toString() operation in Account has the correct size of the collection, but they are not displayed. also, if you have more than 1, the commas are displayed, but not the investment info…

    great blog…looking forward to more.

    May 03, 2009 @ 16:56

  7. Jim

    my bad…the investment domain object toString() operation just returns a string. just need to put the attrs there and it show up great.

    sorry for the confusion. looking forward to the next entries.

    May 03, 2009 @ 17:20

  8. ilango gurusamy

    I have set up the Spring Finance Manager source in Eclipse.
    I was wondering if you have an Ant build script to build it. Are there any problems I should know about for this project before I can write my own Ant build script?

    Oct 24, 2009 @ 05:38

  9. Stefan Schmidt

    Hi Ilango,

    Currently the application ships with a Maven build script which allows you to generate all necessary Eclipse artifacts (mvn eclipse:eclipse). More information on this in the Google code project wiki.

    I have not worked on a Ant script. Do you want to contribute one?


    Nov 08, 2009 @ 17:08

  10. Daniel


    Great app, great job. I have a little bit of problem. I have generated the project for idea with mvn idea:idea command. I don’t know if this is the root cause of my problem, but the autowired bens for example personService, productService are underlined with red by idea saying that : spring could not autowire. There are more than one bean of PersonService type. Beans: persinService, personServiceImpl.

    Is there any way to configure the project correctly?

    Thank you.

    Nov 19, 2009 @ 18:51

  11. Stefan Schmidt


    First, I am not an IntelliJ Idea user so, I have never tested the app in that IDE. I suspect this might be a problem of the IDE rather than the application. After 100+ comments about my articles nobody has raised that issue so far which leads me to believe that others don’t have that problem.

    Have you tried to deploy the application directly from your shell (mvn jetty:run, mvn tomcat:run)? If that works you know that something is wrong with the IDE.

    I would be interested to hear how you go though.


    Nov 20, 2009 @ 07:50

  12. Chiaf


    I imported version 5 into STS. While running on server it give error message:
    Context initialization failed
    org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named ‘conversionService’ must be of type [org.springframework.core.convert.ConversionService], but was actually of type [net.stsmedia.financemanager.web.flow.ApplicationConversionService]
    While ApplicationConversionService extends ConversionService there shouldn’t be such error. How to fix this?


    Feb 05, 2010 @ 16:25

  13. Stefan Schmidt

    Hi Chiaf,

    This is due to some changes made in Spring Framework more recently. STS does check for the newer approach so this article here is a little out of date. I would suggest for you to take a look at Spring Roo which I am actively working on. Roo has a Webflow addon which demonstrates the current suggested integration. I am a little short in time so I will not get around to updating the Spring Finance Manager app soon, but if want you could contribute a patch for it? That would be awesome!


    Feb 06, 2010 @ 20:57

  14. chn


    You can look http://forum.springsource.org/showthread.php?t=79545

    Feb 18, 2010 @ 07:14

  15. mark

    Thanks so much for putting this out there. It is a breath of fresh air after banging my head against struts2/dojo problems for so long!

    Feb 20, 2010 @ 04:52