使用velocity报错

为什么报这个错?


2016-12-04 19:29:29,752 ERROR [http-nio-8080-exec-5] org.apache.velocity - ResourceManager : unable to find resource '/user/logintrack.json.vm' in any resource loader.
2016-12-04 19:30:40,527 ERROR [http-nio-8080-exec-4] org.apache.velocity - ResourceManager : unable to find resource '/user/useraudit.json.vm' in any resource loader.
2016-12-04 19:30:44,208 ERROR [http-nio-8080-exec-7] org.apache.velocity - ResourceManager : unable to find resource '/user/useredit.json.vm' in any resource loader.
2016-12-04 19:30:49,472 ERROR [http-nio-8080-exec-6] org.apache.velocity - ResourceManager : unable to find resource '/user/reset.json.vm' in any resource loader.
2016-12-04 19:30:50,637 ERROR [http-nio-8080-exec-8] org.apache.velocity - ResourceManager : unable to find resource '/user/userlogin.json.vm' in any resource loader.
蓝山帝景
浏览 1387回答 3
3回答

梵蒂冈之花

配置resource了吗 @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/mystatic/**") .addResourceLocations("classpath:/mystatic/"); }

慕虎7371278

配置了 前端返回都是200ok 后端会打error出来

小唯快跑啊

要配置resource。最简单就是把将velocity文件放入src/main/resources/templates,模板文件后缀.vm。按照springboot默认设置
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java