摘要:
(1)配置HiddenHttpMethodFilter(SpringMVC需要配置,SpringBoot已经为我们自动配置了) (2)在视图页面创建一个Post Form表单,在表单中创建一个input项,type="hidden" name="_method",value属性值为请求方式 阅读全文
posted @ 2019-01-26 19:45
SpringCore
阅读(2011)
评论(0)
推荐(0)
摘要:
(1)、编写拦截器 (2)、对拦截器进行注册 阅读全文
posted @ 2019-01-26 19:37
SpringCore
阅读(7875)
评论(0)
推荐(0)
摘要:
(1)、编写国际化配置文件 在resources下新建i18n文件夹,并新建以下文件 ①index.properties 1 username=username ②index_en_US.properties 1 username=username ③index_zh_CN.properties 1 阅读全文
posted @ 2019-01-26 19:13
SpringCore
阅读(7311)
评论(0)
推荐(0)
摘要:
SpringBoot中自动配置了 ViewResolver(视图解析器) ContentNegotiatingViewResolver(组合所有的视图解析器) 自动配置了静态资源文件夹、静态首页、favicon.ico及Webjars Converter(转换器,转换类型使用) Formatter( 阅读全文
posted @ 2019-01-26 17:34
SpringCore
阅读(820)
评论(0)
推荐(0)
摘要:
(1)、添加pom依赖 * SpringBoot1.x 默认的thymeleaf版本低,如果要自定义版本,需要在pom properties 覆写SpringBoot默认的thymeleaf版本号 * SpringBoot2.x 无需此操作 (2)、将Html页面放至classpath:/templ 阅读全文
posted @ 2019-01-26 12:40
SpringCore
阅读(1614)
评论(0)
推荐(0)
摘要:
静态资源是指 》 CSS、JS之类的文件 首先创建SpringBoot Web项目 添加Spring Boot Web Starter 第一种方式(将静态资源文件放至静态资源文件夹) ① “/” 当前项目的根路径 ②classpath:/META-INF/resources/ ③classpath: 阅读全文
posted @ 2019-01-26 12:25
SpringCore
阅读(3521)
评论(0)
推荐(0)
摘要:
JCL(Jakarta Commons Logging) SLF4J(Simple Logging Facade for Java) Jboss-Logging Log4J JUL(java.util.logging) Log4j2 Logback Sping框架默认使用JCL SpingBoot框 阅读全文
posted @ 2019-01-26 11:17
SpringCore
阅读(1304)
评论(0)
推荐(0)

浙公网安备 33010602011771号