Skip to content

Commit

Permalink
Create Admintask only when spring.boot.admin.url is set
Browse files Browse the repository at this point in the history
  • Loading branch information
denschu committed Oct 6, 2014
1 parent bcc721c commit 8704805
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions spring-boot-starter-admin-client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/.settings
/.classpath
/.project
/bin
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public class SpringBootAdminClientAutoConfiguration {
* Task that registers the application at the spring-boot-admin application.
*/
@Bean
public SpringBootAdminRegistratorTask registrator() {
@ConditionalOnProperty("spring.boot.admin.url")
public Runnable registrator() {
return new SpringBootAdminRegistratorTask();
}

Expand Down

0 comments on commit 8704805

Please sign in to comment.