From 6c5701bacda07c621d8730491b7d7a11071bfc2b Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Mon, 20 Jan 2014 16:45:13 -0600 Subject: [PATCH] Use @Autowired AuthenticationManagerBuilder Update documentation to use @Autowired AuthenticationManagerBuilder. Fixes gh-244 --- spring-boot-actuator/README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spring-boot-actuator/README.md b/spring-boot-actuator/README.md index d18a0a0c680..2a83c9d9d14 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: