idea SSM项目,test方法一直在转圈,运行不结束

weixin_38316591 2018-05-23 10:53:54
一直在运行,不成功也不报错
...全文
2602 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_46005091 2021-04-15
  • 打赏
  • 举报
回复
请问问题解决了吗?
Martin_hzy 2019-01-29
  • 打赏
  • 举报
回复
你的好了吗?想请教一下,怎么弄的.我的也是方法一直运行,也不报错,也不结束.
weixin_38316591 2018-05-23
  • 打赏
  • 举报
回复
import javax.annotation.Resource; import com.alibaba.fastjson.JSONObject; import com.qingdeng.domain.TUser; import com.qingdeng.service.ITBlackListService; import com.qingdeng.service.ITDateService; import com.qingdeng.service.ITUserService; import org.apache.log4j.Logger; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.alibaba.fastjson.JSON; import java.util.List; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath:spring-mybatis.xml"}) public class TestMyBatis { private static Logger logger = Logger.getLogger(TestMyBatis.class); private ApplicationContext ac = null; @Resource private ITUserService userService = null; @Autowired private ITBlackListService blackListService; @Autowired private ITDateService dateService; @Before public void before() { ac = new ClassPathXmlApplicationContext("spring-mybatis.xml"); dateService = (ITDateService) ac.getBean("TDateServiceImpl"); } @Test public void test1() { TUser user = new TUser(); List list = dateService.dateList(user); System.out.println(list); logger.info("值:"+JSONObject.toJSONString(list)); } } 代码应该没问题的吧
QWERT4745 2018-05-23
  • 打赏
  • 举报
回复
代码????

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧