Posts Tagged ‘spring’

Unit Testing Spring apps with @RunWith(SpringJUnit4ClassRunner.class)

Thursday, June 24th, 2010

The Problem

I love Spring, who doesn’t?

One thing however that I found, until recently, a bit awkward was Unit Testing objects which were constructed and initiated via the Spring context and injected into other objects that consumed them. I have seen and used many and varied “bespoke” ways to do this, none of which I found satisfying.

This was until a collegue introduced me to the wonder that is SpringJUnit4ClassRunner. I know, I know, I should have been aware of this ages ago but as they say on millionaire “it’s easy if you know the answer”!
(more…)

Tags: , ,
Posted in Examples | 6 Comments »

Use Quartz to schedule tasks in Spring

Friday, May 7th, 2010

Quartz is a full-featured, open source job scheduling service that can be integrated with, or used along side virtually any Java EE or Java SE application.

In this simple example (notionally checking Twitter for updates) we integrate it with Spring.
(more…)

Tags: , ,
Posted in Development, How to's | No Comments »