Created
June 23, 2015 09:03
-
-
Save jwlyn/c032faef22365db12e08 to your computer and use it in GitHub Desktop.
spring 测试
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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