org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service()for servlet
[dispatcherServlet] in context with path [/testShop] threw exception [Request processing
failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: An error
happened during template parsing (template: "ServletContext resource [/WEB-
INF/html/1.html]")] with root cause
解决方式 需要添加该注解:@ResponseBody
@RequestMapping("/isExistsUname")@ResponseBodypublic String isExistsUname(String uname){int i = usersService.isExistsUname(uname);//将返回值拼成字符串类型return i+"";}
报错信息org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcherServlet] in context with path [/testShop] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException.