在做项目上使用thymeleaf 模板遇到的坑,项目在Eclipse上面运行正常,打成jar包再运行所报的错 Error resolving template "/XX/XX", template might not exist or might

原因1:看看Controller 里面是否使用的注解是否@RestController

原因2:如果使用@Controller 需要返回JSON 得加上Response

原因3:返回路径问题下面是我配置的

解决Error resolving template "/sc/getView", template might not exist or might问题

解决Error resolving template "/sc/getView", template might not exist or might问题

之前写的是 return "/sc/addScView";

加上  /  后  eclipse 运行没问题,打成Jar包后 模板就会解析不出来

相关文章:

  • 2021-09-01
  • 2021-12-03
  • 2021-08-15
  • 2021-08-15
  • 2021-05-16
  • 2021-10-27
  • 2021-10-08
猜你喜欢
  • 2022-12-23
  • 2021-04-22
  • 2021-09-30
  • 2021-10-14
  • 2021-12-07
  • 2021-05-09
  • 2022-12-23
相关资源
相似解决方案