标签:use public ram div demo service run red ase
依赖spring的spring-test-4.2.4.RELEASE.jar包
测试代码:
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 com.spring.demo04.UserService; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath:applicationContext.xml") public class Demo { @Autowired private UserService userService; @Test public void run() { userService.save(); } }
运行结果:
标签:use public ram div demo service run red ase
原文地址:https://www.cnblogs.com/jumpkin1122/p/11623850.html