20.2.1 Logging changes in condition evaluation(记录条件评估中的更改)
1 | By default, each time your application restarts, a report showing |
默认情况下,每次您重启您的应用,一个条件评估的增量日志将被打印在控制台。这个日志展示了您应用自动配置部分修改得内容,注入增加,删除beans或者设置配置属性。1
To disable the logging of the report, set the following property:
禁用以上的日志报告,如下设置:1
spring.devtools.restart.log-condition-evaluation-delta=false
20.2.2 Excluding Resources(排除资源)
1 | Certain resources do not necessarily need to trigger a restart |
某些资源没有必要在修改得时候出发重启。举个例子,Thymeleaf模板能够就地编辑。默认情况下,改变/META-INF/maven,
/META-INF/resources, /resources, /static, /public, 或者 /templates这些路径下的内容,并不需要触发重启,但会触发重载。如果您想自定义排除这些,您可以使用spring.devtools.restart.exclude 属性。举个例子,仅仅排除/static 和 /public,您可以设置以下属性:1
spring.devtools.restart.exclude=static/**,public/**
1 | If you want to keep those defaults and add additional exclusions, |
如果您想保留这些默认配置,并增加一些额外的排除项目,使用spring.devtools.restart.additional-exclude属性代替。