Skip to content

Instantly share code, notes, and snippets.

@jwlyn
Created June 23, 2015 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwlyn/c032faef22365db12e08 to your computer and use it in GitHub Desktop.
Save jwlyn/c032faef22365db12e08 to your computer and use it in GitHub Desktop.
spring 测试
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 static org.junit.Assert.assertNotNull;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath*:path/spring-mybatis.xml"})
public class MybatisTest {
@Autowired
private MyClassMapper mapper;
@Test
public void test1()
{
assertNotNull(mapper);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment