Class OptionalLiveReloadServer
- java.lang.Object
- org.springframework.boot.devtools.autoconfigure.OptionalLiveReloadServer
public class OptionalLiveReloadServer extends Object
Manages an optionalLiveReloadServer
. TheLiveReloadServer
may gracefully fail to start (e.g. because of a port conflict) or may be omitted entirely.- Since:
- 1.3.0
Constructor Summary
Constructors Constructor Description OptionalLiveReloadServer(LiveReloadServer server)
Create a newOptionalLiveReloadServer
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
startServer()
PostConstruct
method to start the server if possible.void
triggerReload()
Trigger LiveReload if the server is up an running.
Constructor Detail
OptionalLiveReloadServer
public OptionalLiveReloadServer(LiveReloadServer server)
Create a newOptionalLiveReloadServer
instance.- Parameters:
server
- the server to manage ornull
Method Detail
startServer
@PostConstruct public void startServer() throws Exception
PostConstruct
method to start the server if possible.- Throws:
Exception
- in case of errors
triggerReload
public void triggerReload()
Trigger LiveReload if the server is up an running.