直接上代码~
@Configuration
public class ExportAlarmController {
@Bean(name = "csvView")
public CSVView cSVView() {
return new CSVView();
}
@Autowired
ExportAlarmService exportAlarmService;
@SuppressWarnings({ "unchecked", "rawtypes" })
@RequestMapping(value = "/exportAlarm", method = RequestMethod.POST)
public ModelAndView exportAlarm(HttpServletRequest request, HttpServletResponse response) throws Exception {
System.out.println("-----------------exportAlarm------------------");
Map requestValue = request.getParameterMap();
List list = exportAlarmService.exportAlarm(requestValue);
Map result = new HashMap();
result.put("list", list);
result.put("name", "Alarm");
return new ModelAndView("csvView", result);
}
}
执行上面的代码后出现错误~
org.thymeleaf.exceptions.TemplateInputException: Error resolving template "csvView", template might not exist or might not be accessible by any of the configured Template Resolvers
请问这个要怎么解决呢?