Commit d95e2744 by Dennis Schulte

Create SpringBootAdminClientAutoConfiguration only when URL is set

parent 89a2e687
......@@ -2,6 +2,6 @@ spring.resources.cachePeriod=3600
server.port=8080
info.id=@pom.artifactId@
info.version=@pom.version@
spring.boot.admin.url=http://localhost:8080
logging.file=/tmp/log.log
spring.application.name=spring-boot-admin-example
spring.boot.admin.url=http://localhost:8080
......@@ -30,13 +30,13 @@ import de.codecentric.boot.admin.web.SimpleCORSFilter;
* application is registered at the spring-boot-admin application. If not, it registers itself.
*/
@Configuration
@ConditionalOnProperty("spring.boot.admin.url")
public class SpringBootAdminClientAutoConfiguration {
/**
* Task that registers the application at the spring-boot-admin application.
*/
@Bean
@ConditionalOnProperty("spring.boot.admin.url")
public Runnable registrator() {
return new SpringBootAdminRegistratorTask();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment