mengjianzhou

package com.robert.service;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.context.WebApplicationContext;

/**
* Created by robert on 2016/10/14 0014.
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(“classpath*:ApplicationContext.xml”)
@WebAppConfiguration
public class LoginTest {

private Log log = LogFactory.getLog(LoginTest.class);

@Autowired
WebApplicationContext webApplicationContext;

private XXXXServiceImpl xxxxServiceImpl;

@Before
public void setUp(){

    log.info("CustInvestMappersTest begin init");
    xxxxServiceImpl= (XXXXServiceImpl ) webApplicationContext.getBean("xxxxServiceImpl");
}

@Test
public void testLogin(){

}

}

分类:

技术点:

相关文章:

  • 2021-04-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-12-12
  • 2021-12-16
  • 2021-11-25
猜你喜欢
  • 2021-07-12
  • 2022-12-23
  • 2021-12-12
相关资源
相似解决方案