摘要: 1、导入资源 2、默认的访问首页 (1)、将代码写在controller中 (2)、 WebMvcConfigurerAdapter 已经过时,了解即可 推荐使用:WebMvcConfigurer / WebMvcConfigurationSupport 此时默认访问的/ 以及 index.html 阅读全文
posted @ 2019-01-30 23:05 MrChengs 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 1、springmvc的自动配置 文档:https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#boot-features-spring-mvc WebMvcAutoConfiguration.java 阅读全文
posted @ 2019-01-30 22:57 MrChengs 阅读(752) 评论(0) 推荐(0) 编辑
摘要: JSP、Velocity、Freemarker、Thymeleaf 对于模板引擎,SpringBoot推荐的Thymeleaf; 1)、引入 springboot官方文档 官网:https://www.thymeleaf.org/ 坐标: 切换其版本: 均在GitHub中进行查看 2)、使用 使用规 阅读全文
posted @ 2019-01-30 19:04 MrChengs 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 对静态资源映射的映射类配置: 1)、 webjars 所有 /webjars/** ,都去 classpath:/META-INF/resources/webjars/ 找资源; webjars:以jar包的方式引入静态资源; 网址:https://www.webjars.org/ 访问网址进行一下 阅读全文
posted @ 2019-01-30 18:21 MrChengs 阅读(543) 评论(0) 推荐(0) 编辑