静态页面访问
(其他静态资源也行)
spring boot项目只有src目录,没有webapp目录,会将静态访问(html/图片等)映射到其自动配置的静态目录,如下
/META-INF/resources
/src/java/resources
/static
/public
/resources
比如,在resources建立一个static目录和index.htm静态文件,访问地址 http://localhost:8080/index.html
只有这三个行,放在templates 和直接放在src/main/resources 下是没办法静态访问的。
HTML
第一个thymeleaf程序
1234567890!!!xx
静态效果
静