What does this do: @RunWith(SpringJUnit4ClassRunner.class)

The annotation is used to configure a unit test that required Spring’s dependency injection.

From Spring Reference – 10. Unit Testing:

10.1 Creating a Unit Test Class

In order for the unit test to run a batch job, the framework must load the job’s ApplicationContext. Two annotations are used to trigger this:

@RunWith(SpringJUnit4ClassRunner.class): Indicates that the class should use Spring’s JUnit facilities.

@ContextConfiguration(locations = {…}): Indicates which XML files contain the ApplicationContext.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)