DelayedLiveReloadTrigger(OptionalLiveReloadServer liveReloadServer, ClientHttpRequestFactory requestFactory, String url) { Assert.notNull(liveReloadServer, "LiveReloadServer must not be null"); Assert.notNull(requestFactory, "RequestFactory must not be null"); Assert.hasLength(url, "URL must not be empty"); this.liveReloadServer = liveReloadServer; this.requestFactory = requestFactory; try { this.uri = new URI(url); } catch (URISyntaxException ex) { throw new IllegalArgumentException(ex); } }
@Bean public OptionalLiveReloadServer optionalLiveReloadServer() { return new OptionalLiveReloadServer(this.liveReloadServer); }
@Test public void liveReloadDisabled() throws Exception { configure("spring.devtools.livereload.enabled:false"); this.thrown.expect(NoSuchBeanDefinitionException.class); this.context.getBean(OptionalLiveReloadServer.class); }