[AppleScript] 纯文本查看 复制代码
//课程详情页面测试
@RequestMapping("/course") public String course(Map<String,Object> map){
ResponseEntity<Map> forEntity =
restTemplate.getForEntity("http://localhost:31200/course/courseview/4028e581617f945f01617f9dabc4 0000", Map.class);
Map body = forEntity.getBody();
map.put("model",body); return "course"; }
[AppleScript] 纯文本查看 复制代码
//文件存储2
@Test public void testStore2() throws FileNotFoundException {
File file = new File("C:\\Users\\admin\\Desktop\\course.ftl");
FileInputStream inputStream = new FileInputStream(file);
//保存模版文件内容
GridFSFile gridFSFile = gridFsTemplate.store(inputStream, "课程详情模板文件","");
String fileId = gridFSFile.getId().toString();
System.out.println(fileId); }
[AppleScript] 纯文本查看 复制代码
{
"_class" : "com.xuecheng.framework.domain.cms.CmsTemplate",
"siteId" : "5a751fab6abb5044e0d19ea1",
"templateName" : "课程详情页面正式模板",
"templateFileId" : "这里填写上边代码返回的模板文件id" }