@EggGump
2018-07-09T07:11:02.000000Z
字数 1059
阅读 919
spring,maven相关
通常用springboot+themyleaf写后台后,再用vue写前端。
vue写完前端后会生成前端页面并存在dist文件夹中,这个文件夹中的的内容分为两个部分:index,和除index之外其他的在一起我们统称为static文件.通常将index放入工程的templates目录下,而其他的放入工程的static目录下即可,但在实际应用中我们需要前后端分离
这里的路径其实就是index的路径
#修改templates的置,默认为:classpath:templates/,改为具体某个文件位置时要加file,如下spring.thymeleaf.prefix=file:d:/eclipse-workspace/src/spui/dist/#后缀spring.thymeleaf.suffix=.htmlspring.thymeleaf.mode=HTML5spring.thymeleaf.encoding=UTF-8spring.thymeleaf.content-type=text/html#缓存,主要作用是当页面修改后能否可以实进看到更新页面,开发时一般改为falsespring.thymeleaf.cache=falsespring.resources.chain.strategy.content.enabled=true#这行反正要,我也不知道有作用是什么spring.resources.chain.strategy.content.paths=/**
这里的路径其实是static文件路径
web.upload-path=d:/eclipse-workspace/src/spui/dist/spring.mvc.static-path-pattern=/**#这里同样,指定本地位置时要加filespring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,\classpath:/static/,classpath:/public/,file:${web.upload-path}
