diff --git a/spring-boot-actuator/README.md b/spring-boot-actuator/README.md index d18a0a0c68..2a83c9d9d1 100644 --- a/spring-boot-actuator/README.md +++ b/spring-boot-actuator/README.md @@ -297,11 +297,10 @@ point to a database or directory server, you only need to provide a - @Bean - public AuthenticationManager authenticationManager() throws Exception { - return new AuthenticationManagerBuilder( - ObjectPostProcessor.QUIESCENT_POSTPROCESSOR).inMemoryAuthentication().withUser("client") - .password("secret").roles("USER").and().and().build(); + @Autowired + public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { + auth.inMemoryAuthentication() + .withUser("client").password("secret").roles("USER"); } Try it out: