Unit Testing

Spring Annotation for Junit

@RunWith(SpringJUnit4ClassRunner.class)
//specifies the Spring configuration to load for this test fixture
@ContextConfiguration(locations={"/service-config.xml"})

public class DefaultAccountServiceTest {
    @Autowired    
    private AccountService accountService;

你可能感兴趣的:(java,spring,xml,JUnit)