In a standalone application the Actuator HTTP port defaults to the same as the main HTTP
port. To make the application listen on a different port set the external property
management.port
. To listen on a completely different network address (e.g. if you have
an internal network for management and an external one for user applications) you can
also set management.address
to a valid IP address that the server is able to bind to.
For more detail look at the
ManagementServerProperties
source code and
Section 36.3, “Customizing the management server port”
in the “Production-ready features” section.
The Actuator installs a “whitelabel” error page that you will see in browser client if
you encounter a server error (machine clients consuming JSON and other media types should
see a sensible response with the right error code). To switch it off you can set
error.whitelabel.enabled=false
, but normally in addition or alternatively to that you
will want to add your own error page replacing the whitelabel one. Exactly how you do this
depends on the templating technology that you are using. For example, if you are using
Thymeleaf you would add an error.html
template and if you are using FreeMarker you would
add an error.ftl
template. In general what you need is a View
that resolves with a name
of error
, and/or a @Controller
that handles the /error
path. Unless you replaced some
of the default configuration you should find a BeanNameViewResolver
in your
ApplicationContext
so a @Bean
with id error
would be a simple way of doing that.
Look at ErrorMvcAutoConfiguration
for more options.