Commit 87048059 by Dennis Schulte

Create Admintask only when spring.boot.admin.url is set

parent bcc721cf
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
/.settings /.settings
/.classpath /.classpath
/.project /.project
/bin
...@@ -36,7 +36,8 @@ public class SpringBootAdminClientAutoConfiguration { ...@@ -36,7 +36,8 @@ public class SpringBootAdminClientAutoConfiguration {
* Task that registers the application at the spring-boot-admin application. * Task that registers the application at the spring-boot-admin application.
*/ */
@Bean @Bean
public SpringBootAdminRegistratorTask registrator() { @ConditionalOnProperty("spring.boot.admin.url")
public Runnable registrator() {
return new SpringBootAdminRegistratorTask(); 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