I am trying to understand how to use SBAP in my application because it is a very handy tool for development. I\'m reading their reference guide but I\'m not understanding a few
- So am I registering my application as the server and the client?
In your example, you do. It's not problem that the admin server is a client to itself. In fact the spring-boot-admin-sample is configured this way so you get infos about the admin server itself.
- How do I run this application and access the admin page? They don't mention any URL to go to to see the admin page. Is it just: http://localhost:8080?
Yes. If you don't set the spring.boot.admin.context-path
the admin is served on root. So if you ship the admin along inside your business-app you should configure spring.boot.admin.context-path
so that it's served elsewhere.
- How do I set this up for development but turn it off in production? There reference guide at the bottom says: ...
The point is just to use two separate applications. This is the way we do it from dev-, over qa- to production-stage. We always separate the business- from the admin-server. If you want to enable the admin-server inside your business-application conditionally try this approach:
Write an @Configuration
-class wich is only active within a certain profile and move the @EnableAdminServer
to this configuration.
Hope this helps.