类 DefaultRestartInitializer
- java.lang.Object
- org.springframework.boot.devtools.restart.DefaultRestartInitializer
- 所有已实现的接口:
RestartInitializer
public class DefaultRestartInitializer extends Object implements RestartInitializer
DefaultRestartInitializer
that only enable initial restart when running a standard "main" method. Skips initialization when running "fat" jars (included exploded) or when running from a test.- 从以下版本开始:
- 1.3.0
字段概要
从接口继承的字段 org.springframework.boot.devtools.restart.RestartInitializer
NONE
构造器概要
构造器 构造器 说明 DefaultRestartInitializer()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 URL[]
getInitialUrls(Thread thread)
Return the initial set of URLs for theRestarter
ornull
if no initial restart is required.protected URL[]
getUrls(Thread thread)
Return the URLs that should be used with initialization.protected boolean
isMain(Thread thread)
Returns if the thread is for a main invocation.protected boolean
isSkippedStackElement(StackTraceElement element)
Checks if a specificStackTraceElement
should cause the initializer to be skipped.
构造器详细资料
DefaultRestartInitializer
public DefaultRestartInitializer()
方法详细资料
getInitialUrls
public URL[] getInitialUrls(Thread thread)
从接口复制的说明:RestartInitializer
Return the initial set of URLs for theRestarter
ornull
if no initial restart is required.- 指定者:
getInitialUrls
在接口中RestartInitializer
- 参数:
thread
- the source thread- 返回:
- initial URLs or
null
isMain
protected boolean isMain(Thread thread)
Returns if the thread is for a main invocation. By default checks the name of the thread and the context classloader.- 参数:
thread
- the thread to check- 返回:
true
if the thread is a main invocation
isSkippedStackElement
protected boolean isSkippedStackElement(StackTraceElement element)
Checks if a specificStackTraceElement
should cause the initializer to be skipped.- 参数:
element
- the stack element to check- 返回:
true
if the stack element means that the initializer should be skipped