爱折腾的Albert 2018-05-14 10:04 采纳率: 0%
浏览 509
已结题

ssm整合Junit4 报 绑定异常

这个测试我之前是可以用的。然后我重新装系统了。重新git下来就是这样了。

package com.komlin.modular.mapper;
import Model.ClassArrangeData;
import com.komlin.component.Junit.JUnit4ClassRunner;
import com.komlin.component.utils.PoiUtil;
import com.komlin.component.utils.UUIDUtils;
import com.komlin.modular.education.mapper.*;
import com.komlin.modular.education.model.ClassInfo;
import com.komlin.modular.education.model.Course;
import com.komlin.modular.education.model.StudentScore;
import com.komlin.modular.education.pojo.dto.*;
import com.komlin.modular.education.pojo.vo.response.StudentCouserArrangeResponse;
import com.komlin.modular.system.mapper.MenuMapper;
import com.komlin.modular.system.mapper.RoleMenuMapper;
import com.komlin.modular.system.mapper.UserInfoMapper;
import com.komlin.modular.system.model.Menu;
import com.komlin.modular.system.model.RoleMenu;
import com.komlin.modular.system.model.UserInfo;
import com.komlin.modular.system.DTO.SelectProfessionInfoByUserIdDTO;
import net.sf.json.JSONArray;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
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 java.util.*;

/**

  • @author huzhengxing
  • @description:
  • @date 2017/11/6 15:46
    /
    @RunWith(JUnit4ClassRunner.class)
    @ContextConfiguration(locations = "classpath:spring/applicationContext-
    .xml")
    public class EducationMapperTest {

    private Logger logger = Logger.getLogger(EducationMapperTest.class);

    @Autowired
    private UserInfoMapper userInfoMapper;

    @Autowired
    private ClassInfoMapper classInfoMapper;

    @Autowired
    private CourseArrangeMapper courseArrangeMapper;

    @Autowired
    private TutorTeacherMapper tutorTeacherMapper;

    @Autowired
    private ProfessionArrangeMapper professionArrangeMapper;

    @Autowired
    private StudentScoreMapper studentScoreMapper;

    @Autowired
    private CourseMapper courseMapper;

    @Autowired
    private MenuMapper menuMapper;

    @Autowired
    private RoleMenuMapper roleMenuMapper;

    @Test
    public void insertRoleMenu() {
    List

    menus = menuMapper.selectMenuList();
    for (Menu menu : menus) {
    RoleMenu record = new RoleMenu();
    record.setRmId(UUIDUtils.getUniquekey());
    record.setRmRId(4);
    record.setRmMId(menu.getMenuId());
    roleMenuMapper.insertSelective(record);
    }
    }

    @Test
    public void listCourseArrange() {
    List courseArrangeDTOS = courseArrangeMapper.listCourseArrange(null, null, null, null, null, null);
    System.out.println(courseArrangeDTOS);
    }

    @Test
    public void listStudentInfo() {
    System.out.println(JSONArray.fromObject(userInfoMapper.listStudentInfo()));
    }
    }

异常

ocking Pass-Through Statistic: LOCAL_DISK_SIZE_BYTES>
2018-05-14 17:39:16,952 DEBUG [net.sf.ehcache.statistics.extended.ExtendedStatisticsImpl] -
2018-05-14 17:39:16,952 DEBUG [net.sf.ehcache.statistics.extended.ExtendedStatisticsImpl] -
2018-05-14 17:39:16,952 DEBUG [net.sf.ehcache.statistics.extended.ExtendedStatipl] -
2018-05-14 17:39:16,953 DEBUG [net.sf.ehcache.statistics.extended.ExtendedStatisticsImpl] -
2018-05-14 17:39:16,995 DEBUG [net.sf.ehcache.statistics.extended.ExtendedStati9:16,997 DEBUG [net.sf.ehcache.statistics.extended.ExtendedStati

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.komlin.modular.education.mapper.StudentScoreMapper.listStudentInfo

at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:189)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:43)
at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:58)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:51)
at com.sun.proxy.$Proxy31.listStudentInfo(Unknown Source)
at com.komlin.modular.mapper.EducationMapperTest.insertStudentScore(EducationMapperTest.java:273)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:254)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:193)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Disconnected from the target VM, address: '127.0.0.1:39803', transport: 'socket'

Process finished with exit code 255

  • 写回答

5条回答 默认 最新

  • 奶儿 2018-05-14 10:08
    关注

    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

    评论

报告相同问题?

悬赏问题

  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图