SpringBoot
补充二
一.错误处理
SpringBoot
发生错误后,默认会跳转到/error
页面,如果没有/error
页面,那么会跳转到默认的错误页面,但我们可以自定义错误页面,在templates目录下创建一个error.html
页面
${timestamp}
获取错误发生的时间${error}
错误的原因${message}
错误的信息${path}
请求路径${status}
状态码
二.配置文件分类
properties
格式
yml
格式
yaml
格式
优先级:properties>yml>yaml
三.热部署
-
导入jar包
-
<!--热部署配置--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency> 1 2 3 4 5 6 7
-
setting—compiler—Build project auto