I would go with Spring first. Spring has so many different pieces that are useful: dependency injection, aspect-oriented programming, JDBC helper classes, an entire MVC framework and loads more. You can use as little or as much of Spring as you want on your first application and the reference documentation is truly excellent. You can easily learn Spring without buying even a single book on it.