设置web页面位置
静态web资源,有两种方式。
方式一:在static下新建js和img和css即可。不推荐,因为打包会直接打进去,修改不方便。
方式二:设置路径,如下,在jar包同路径新建static文件夹即可。
spring:resources:static-locations: file:./static
开启gzip压缩
server:compression:enabled: truemime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
