@RestController@RequestMapping(value="/exam/")public class MarkTaskController { private static final Logger logger = LogManager.getLogger(MarkTaskController.class); @Autowired private MarkTaskService stS; @RequestMapping(value = "/marktask/list/", method = RequestMethod.GET) public List<MarkTaskBrife> getMarkTask(HttpServletResponse resp) { logger.debug("getMarkTask(), start to retrieving all examination result."); new metaInfo().getmetaTaskInfo(null); return null;
代码“ new metaInfo()”不正确。还应按以下方式自动接线,
@Autowired private metaInfo mi; @RequestMapping(value = "/marktask/list/", method = RequestMethod.GET) public List<MarkTaskBrife> getMarkTask(HttpServletResponse resp) { logger.debug("getMarkTask(), start to retrieving all examination result."); mi.getmetaTaskInfo(null); return null;
然后一切正常。
非常感谢@Chacko在此问题上的帮助。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)