在測試類的上方加入以下註解
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:spring.xml")
public class Test01 {
@Autowired
private AmqSenderService mapper;
@Test
public void test04() {
// mapper.sendMsg();
}
在測試類的上方加入以下註解
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:spring.xml")
public class Test01 {
@Autowired
private AmqSenderService mapper;
@Test
public void test04() {
// mapper.sendMsg();
}